Method: AX::Element#to_point
- Defined in:
- lib/ax/element.rb
#to_point ⇒ CGPoint Also known as: hitpoint
Get the center point of the element.
462 463 464 465 466 467 468 |
# File 'lib/ax/element.rb', line 462 def to_point size = attribute :size point = attribute :position point.x += size.width / 2 point.y += size.height / 2 point end |