Class: Geom::Bounds2d
| Relationships | |
| Inherits: | Object |
Overview
The bounds2d class represents an axis aligned bounding box represented by two Point2d objects, upper left and lower right positions. The units utilized in the creation and modification Bounds2d are inches.
Class Method Summary
-
.new(other_bounds) ⇒ Geom::Bounds2d
constructor
The
#initializemethod creates a newBounds2d.
Instance Method Summary
-
#==(other) ⇒ Boolean
The #== method checks to see if the two
Bounds2ds are equal. -
#height ⇒ Float
The #height method returns the height of the
Bounds2d. -
#lower_right ⇒ Geom::Point2d
The #lower_right method returns the
Point2dof the lower right corner of theBounds2d. -
#set!(other_bounds) ⇒ Geom::Bounds2d
The #set! method is used to update the dimensions and position of a
Bounds2dobject so that it matches the specified bounds. - #to_a ⇒ Array(Geom::Point2d, Geom::Point2d)
-
#upper_left ⇒ Geom::Point2d
The #upper_left method returns the
Point2dof the upper left corner of theBounds2d. -
#width ⇒ Float
The #width method returns the width of the
Bounds2d.
Constructor Details
.new(other_bounds) ⇒ Bounds2d
.new(upper_left, lower_right) ⇒ Bounds2d
.new(x, y, width, height) ⇒ Bounds2d
.new(point_array) ⇒ Bounds2d
.new(float_array) ⇒ Bounds2d
Bounds2d
.new(upper_left, lower_right) ⇒ Bounds2d
.new(x, y, width, height) ⇒ Bounds2d
.new(point_array) ⇒ Bounds2d
.new(float_array) ⇒ Bounds2d
The #initialize method creates a new Bounds2d.
Instance Method Details
#==(other) ⇒ Boolean
The #== method checks to see if the two Bounds2ds are equal. This checks whether the point values are the same
#height ⇒ Float
The #height method returns the height of the Bounds2d.
#lower_right ⇒ Geom::Point2d
The #lower_right method returns the Point2d of the lower right corner of the Bounds2d.
#set!(other_bounds) ⇒ Bounds2d
#set!(upper_left, lower_right) ⇒ Bounds2d
#set!(x, y, width, height) ⇒ Bounds2d
#set!(point_array) ⇒ Bounds2d
#set!(float_array) ⇒ Bounds2d
Bounds2d
#set!(upper_left, lower_right) ⇒ Bounds2d
#set!(x, y, width, height) ⇒ Bounds2d
#set!(point_array) ⇒ Bounds2d
#set!(float_array) ⇒ Bounds2d
The #set! method is used to update the dimensions and position of a Bounds2d object so that it matches the specified bounds. The argument is anything that can be converted into a Bounds2d.
#to_a ⇒ Array(Geom::Point2d, Geom::Point2d)
The #to_a method returns an array which contains the Point2ds that define the Bounds2d.
#upper_left ⇒ Geom::Point2d
The #upper_left method returns the Point2d of the upper left corner of the Bounds2d.
#width ⇒ Float
The #width method returns the width of the Bounds2d.