Class: Glimmer::LibUI::Shape::Square
- Inherits:
-
Glimmer::LibUI::Shape
- Object
- Glimmer::LibUI::Shape
- Glimmer::LibUI::Shape::Square
- Defined in:
- lib/glimmer/libui/shape/square.rb
Instance Attribute Summary
Attributes inherited from Glimmer::LibUI::Shape
#args, #block, #keyword, #parent
Instance Method Summary collapse
Methods inherited from Glimmer::LibUI::Shape
#area_proxy, constant_symbol, create, #destroy, exists?, #initialize, #method_missing, parameter_defaults, parameters, #path_proxy, #post_add_content, #redraw, #respond_to?, shape_class
Methods included from Parent
#children, #post_initialize_child
Constructor Details
This class inherits a constructor from Glimmer::LibUI::Shape
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::LibUI::Shape
Instance Method Details
#draw(area_draw_params) ⇒ Object
31 32 33 34 |
# File 'lib/glimmer/libui/shape/square.rb', line 31 def draw(area_draw_params) ::LibUI.draw_path_add_rectangle(path_proxy.libui, *@args, length) super end |
#include?(x, y) ⇒ Boolean
36 37 38 |
# File 'lib/glimmer/libui/shape/square.rb', line 36 def include?(x, y) x.between?(self.x, self.x + length) && y.between?(self.y, self.y + length) end |