Class: Glimmer::SWT::Custom::Shape::Point
- Inherits:
-
Glimmer::SWT::Custom::Shape
- Object
- Glimmer::SWT::Custom::Shape
- Glimmer::SWT::Custom::Shape::Point
- Defined in:
- lib/glimmer/swt/custom/shape/point.rb
Constant Summary
Constants inherited from Glimmer::SWT::Custom::Shape
Instance Attribute Summary
Attributes inherited from Glimmer::SWT::Custom::Shape
#args, #drawable, #extent, #name, #options, #parent, #shapes
Instance Method Summary collapse
- #height ⇒ Object
- #include?(x, y) ⇒ Boolean (also: #contain?)
- #parameter_names ⇒ Object
- #width ⇒ Object
Methods inherited from Glimmer::SWT::Custom::Shape
#absolute_x, #absolute_y, #add_shape, #amend_method_name_options_based_on_properties!, #apply_property_arg_conversions, #apply_shape_arg_conversions!, #apply_shape_arg_defaults!, arg_options, #background_pattern_args, #bounds, #calculate_paint_args!, #calculated_args, #calculated_args?, #calculated_args_changed!, #calculated_args_changed_for_default_size!, #calculated_height, #calculated_width, #calculated_x, #calculated_y, create, #current_parameter_name?, #default_height, #default_height?, #default_height_delta, #default_height_delta=, #default_width, #default_width?, #default_width_delta, #default_width_delta=, #default_x, #default_x?, #default_x_delta, #default_x_delta=, #default_y, #default_y?, #default_y_delta, #default_y_delta=, #dispose, #draw?, #ensure_extent, #expanded_shapes, #fill?, flyweight_method_names, flyweight_patterns, #foreground_pattern_args, gc_instance_methods, #get_attribute, #gradient?, #has_attribute?, #has_some_background?, #has_some_foreground?, #initialize, #inspect, keywords, #location_parameter_names, #method_missing, method_name, #move_by, #paint, #paint_children, #paint_self, #parameter_index, #parameter_name?, #parent_shape_absolute_location_changed?, #pattern, pattern, #pattern_args, #possible_parameter_names, #post_add_content, #respond_to?, #round?, #set_attribute, #set_parameter_attribute, #size, #tolerate_shape_extra_args!, valid?
Methods included from Properties
attribute_getter, #attribute_getter, attribute_setter, #attribute_setter, normalized_attribute, #normalized_attribute, ruby_attribute_getter, #ruby_attribute_setter, ruby_attribute_setter
Methods included from Packages
Constructor Details
This class inherits a constructor from Glimmer::SWT::Custom::Shape
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::SWT::Custom::Shape
Instance Method Details
#height ⇒ Object
44 45 46 |
# File 'lib/glimmer/swt/custom/shape/point.rb', line 44 def height 1 end |
#include?(x, y) ⇒ Boolean Also known as: contain?
48 49 50 51 |
# File 'lib/glimmer/swt/custom/shape/point.rb', line 48 def include?(x, y) # give it some fuzz (helps makes mouse clicking easier) x.to_i.between?(self.absolute_x.to_i - 2, self.absolute_x.to_i + 2) && y.to_i.between?(self.absolute_y.to_i - 2, self.absolute_y.to_i + 2) end |
#parameter_names ⇒ Object
36 37 38 |
# File 'lib/glimmer/swt/custom/shape/point.rb', line 36 def parameter_names [:x, :y] end |
#width ⇒ Object
40 41 42 |
# File 'lib/glimmer/swt/custom/shape/point.rb', line 40 def width 1 end |