Class: Glimmer::Gtk::Shape::Square
- Inherits:
-
Glimmer::Gtk::Shape
- Object
- Glimmer::Gtk::Shape
- Glimmer::Gtk::Shape::Square
- Defined in:
- lib/glimmer/gtk/shape/square.rb
Constant Summary
Constants inherited from Glimmer::Gtk::Shape
SHAPE_FILL_PROPERTIES, SHAPE_FONT_PROPERTIES, SHAPE_GENERAL_PROPERTIES, SHAPE_STROKE_PROPERTIES
Instance Attribute Summary
Attributes inherited from Glimmer::Gtk::Shape
#args, #block, #clip, #fill, #keyword, #parent, #stroke
Instance Method Summary collapse
Methods inherited from Glimmer::Gtk::Shape
#apply_property, constant_symbol, #content, create, descendant_keyword_constant_map, #draw, #draw_clip, #draw_fill, #draw_font, #draw_stroke, exist?, #initialize, keyword, map_descendant_keyword_constants_for, #method_missing, one_based_color_rgb, #post_add_content, #post_initialize_child, reset_descendant_keyword_constant_map, #respond_to?, set_source_dynamically, shape_class, #window_proxy
Methods included from Transformable
#apply_transforms, #initialize, #rotate, #scale, #translate
Constructor Details
This class inherits a constructor from Glimmer::Gtk::Shape
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::Gtk::Shape
Instance Method Details
#draw_shape(drawing_area_widget, cairo_context) ⇒ Object
65 66 67 68 69 70 |
# File 'lib/glimmer/gtk/shape/square.rb', line 65 def draw_shape(, cairo_context) # expecting 3 args (x, y, length), so duplicate length again to become width/height for rectangle draw_args = args.dup draw_args << draw_args.last cairo_context.rectangle(*draw_args) end |