Class Fox::FXRectangle
In: rdoc-sources/FXRectangle.rb
Parent: Object

Rectangle

Methods

contains?   contains?   contains?   grow!   grow!   grow!   move!   move!   new   new   new   new   shrink!   shrink!   shrink!  

Attributes

h  [RW]  Rectangle height [Integer]
w  [RW]  Rectangle width [Integer]
x  [RW]  Upper left corner‘s x-coordinate [Integer]
y  [RW]  Upper left corner‘s y-coordinate [Integer]

Public Class methods

Return an uninitialized FXRectangle instance.

Return an initialized FXRectangle instance.

Parameters:

topleft:upper left corner‘s initial position [FXPoint]
bottomright:bottom right corner‘s initial position [FXPoint]

Return an initialized FXRectangle instance.

Parameters:

p:upper left corner‘s initial position [FXPoint]
s:initial size [FXSize]

Return an initialized FXRectangle instance.

Parameters:

xx:upper left corner‘s initial x-coordinate [Integer]
yy:upper left corner‘s initial y-coordinate [Integer]
ww:initial width [Integer]
hh:initial height [Integer]

Public Instance methods

Return true if p (an FXPoint instance) is contained within this rectangle.

Return true if r (another FXRectangle instance) is properly contained within this rectangle.

Return true if the point at (xx, yy) is contained within this rectangle.

Grow the rectangle by some amount and return a reference to the rectangle.

Parameters:

hormargin:number of units to grow on the left and right sides [Integer]
vermargin:number of units to grow on the top and bottom sides [Integer]

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]

Grow the rectangle by some amount and return a reference to the rectangle.

Parameters:

margin:number of units to grow on each side [Integer]

Shift each of the rectangle‘s corners by the amount p (an FXPoint instance) and return a reference to the rectangle.

Shift each of the rectangle‘s corners by the amount (dx, dy) and return a reference to the rectangle.

Shrink the rectangle by margin units, and return a reference to the rectangle.

Parameters:

margin:number of units to shrink on each side [Integer]

Shrink the rectangle by some amount, and return a reference to the rectangle.

Parameters:

hormargin:number of units to shrink on the left and right sides [Integer]
vermargin:number of units to shrink on the top and bottom sides [Integer]

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]

[Validate]