Class: Fox::FXRectangle

Inherits:
Object
  • Object
show all
Defined in:
rdoc-sources/FXRectangle.rb

Overview

Rectangle

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hObject

Rectangle height [Integer]



19
20
21
# File 'rdoc-sources/FXRectangle.rb', line 19

def h
  @h
end

#wObject

Rectangle width [Integer]



16
17
18
# File 'rdoc-sources/FXRectangle.rb', line 16

def w
  @w
end

#xObject

Upper left corner’s x-coordinate [Integer]



10
11
12
# File 'rdoc-sources/FXRectangle.rb', line 10

def x
  @x
end

#yObject

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.

Returns:

  • (Boolean)


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