Class: Fox::FXRectangle
- Inherits:
-
Object
- Object
- Fox::FXRectangle
- Defined in:
- rdoc-sources/FXRectangle.rb
Overview
Rectangle
Instance Attribute Summary collapse
-
#h ⇒ Object
Rectangle height [Integer].
-
#w ⇒ Object
Rectangle width [Integer].
-
#x ⇒ Object
Upper left corner’s x-coordinate [Integer].
-
#y ⇒ Object
Upper left corner’s y-coordinate [Integer].
Instance Method Summary collapse
-
#contains?(r) ⇒ Boolean
Return true if r (another FXRectangle instance) is properly contained within this rectangle.
-
#grow!(leftmargin, rightmargin, topmargin, bottommargin) ⇒ Object
Grow the rectangle by some amount and return a reference to the rectangle.
-
#initialize(topleft, bottomright) ⇒ FXRectangle
constructor
Return an initialized FXRectangle instance.
-
#move!(dx, dy) ⇒ Object
Shift each of the rectangle’s corners by the amount (dx, dy) and return a reference to the rectangle.
-
#shrink!(leftmargin, rightmargin, topmargin, bottommargin) ⇒ Object
Shrink the rectangle by some amount, and return a reference to the rectangle.
Constructor Details
#initialize(topleft, bottomright) ⇒ FXRectangle
Return an initialized FXRectangle instance.
Parameters:
topleft
-
upper left corner’s initial position FXPoint
bottomright
-
bottom right corner’s initial position FXPoint
24 |
# File 'rdoc-sources/FXRectangle.rb', line 24 def initialize; end |
Instance Attribute Details
#h ⇒ Object
Rectangle height [Integer]
19 20 21 |
# File 'rdoc-sources/FXRectangle.rb', line 19 def h @h end |
#w ⇒ Object
Rectangle width [Integer]
16 17 18 |
# File 'rdoc-sources/FXRectangle.rb', line 16 def w @w end |
#x ⇒ Object
Upper left corner’s x-coordinate [Integer]
10 11 12 |
# File 'rdoc-sources/FXRectangle.rb', line 10 def x @x end |
#y ⇒ Object
Upper left corner’s y-coordinate [Integer]
13 14 15 |
# File 'rdoc-sources/FXRectangle.rb', line 13 def y @y end |
Instance Method Details
#contains?(r) ⇒ Boolean
Return true if r (another FXRectangle instance) is properly contained within this rectangle.
61 |
# File 'rdoc-sources/FXRectangle.rb', line 61 def contains?(p); end |
#grow!(leftmargin, rightmargin, topmargin, bottommargin) ⇒ Object
Grow the rectangle by some amount and return a reference to the rectangle.
Parameters:
leftmargin
-
number of units to grow on the left side [Integer]
rightmargin
-
number of units to grow on the right side [Integer]
topmargin
-
number of units to grow on the top side [Integer]
bottommargin
-
number of units to grow on the bottom side [Integer]
93 |
# File 'rdoc-sources/FXRectangle.rb', line 93 def grow!(margin); end |
#move!(dx, dy) ⇒ Object
Shift each of the rectangle’s corners by the amount (dx, dy) and return a reference to the rectangle.
78 |
# File 'rdoc-sources/FXRectangle.rb', line 78 def move!(p); end |
#shrink!(leftmargin, rightmargin, topmargin, bottommargin) ⇒ Object
Shrink the rectangle by some amount, and return a reference to the rectangle.
Parameters:
leftmargin
-
number of units to shrink on the left side [Integer]
rightmargin
-
number of units to shrink on the right side [Integer]
topmargin
-
number of units to shrink on the top side [Integer]
bottommargin
-
number of units to shrink on the bottom side [Integer]
124 |
# File 'rdoc-sources/FXRectangle.rb', line 124 def shrink!(margin); end |