#include <Rect.h>
Public Member Functions | |
| BRect () | |
| BRect (const BRect &) | |
| BRect (float l, float t, float r, float b) | |
| BRect (BPoint leftTop, BPoint rightBottom) | |
| BRect & | operator= (const BRect &from) |
| void | Set (float l, float t, float r, float b) |
| Sets the object's rectangle by defining the coordinates of all four sides. | |
| void | SetAsSize (float l, float t, float w, float h) |
| void | PrintToStream () const |
| BPoint | LeftTop () const |
| BPoint | RightBottom () const |
| BPoint | LeftBottom () const |
| BPoint | RightTop () const |
| void | SetLeftTop (const BPoint) |
| void | SetRightBottom (const BPoint) |
| void | SetLeftBottom (const BPoint) |
| void | SetRightTop (const BPoint) |
| void | InsetBy (BPoint) |
| void | InsetBy (float dx, float dy) |
| void | InsetBy (const BInsets &d) |
| void | OffsetBy (BPoint) |
| void | OffsetBy (float dx, float dy) |
| void | OffsetTo (BPoint) |
| void | OffsetTo (float x, float y) |
| BRect & | InsetBySelf (BPoint) |
| BRect & | InsetBySelf (float dx, float dy) |
| BRect & | InsetBySelf (const BInsets &d) |
| BRect | InsetByCopy (BPoint) const |
| BRect | InsetByCopy (float dx, float dy) const |
| BRect | InsetByCopy (const BInsets &d) const |
| BRect & | OffsetBySelf (BPoint) |
| BRect & | OffsetBySelf (float dx, float dy) |
| BRect | OffsetByCopy (BPoint) const |
| BRect | OffsetByCopy (float dx, float dy) const |
| BRect & | OffsetToSelf (BPoint) |
| BRect & | OffsetToSelf (float dx, float dy) |
| BRect | OffsetToCopy (BPoint) const |
| BRect | OffsetToCopy (float dx, float dy) const |
| bool | operator== (BRect) const |
| bool | operator!= (BRect) const |
| BRect | operator & (BRect) const |
| BRect | operator| (BRect) const |
| bool | Intersects (BRect r) const |
| bool | IsValid () const |
| float | Width () const |
| int32 | IntegerWidth () const |
| float | Height () const |
| int32 | IntegerHeight () const |
| bool | Contains (BPoint) const |
| bool | Contains (BRect) const |
| BInsets | InsetOf (const BRect &interior) const |
| BRect | operator * (const float f) const |
| BRect | operator+ (const BPoint &p) const |
| BRect | operator+ (const BInsets &i) const |
| BRect | operator- (const BPoint &p) const |
| BRect | operator- (const BInsets &i) const |
| BRect | operator/ (const float f) const |
| BRect & | operator *= (const float f) |
| BRect & | operator+= (const BPoint &p) |
| BRect & | operator+= (const BInsets &i) |
| BRect & | operator-= (const BPoint &p) |
| BRect & | operator-= (const BInsets &i) |
| BRect & | operator/= (const float f) |
Public Attributes | |
| float | left |
| float | top |
| float | right |
| float | bottom |
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
Returns
|
|
|
Returns
|
|
|
|
|
|
|
|
||||||||||||
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
|
|
||||||||||||
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
|
|
||||||||||||
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
Insets the sides of the BRect's rectangle by x units (left and right sides) and y units (top and bottom). Positive inset values shrink the rectangle; negative values expand it. Note that both sides of each pair moves the full amount. For example, if you inset a BRect by (4,4), the left side moves (to the right) four units and the right side moves (to the left) four units (and similarly with the top and bottom).
|
|
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
||||||||||||
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
||||||||||||
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
|
Moves the BRect horizontally by x units and vertically by y units. The rectangle's size doesn't change.
|
|
||||||||||||
|
Moves the BRect to the location (x,y).
|
|
|
Moves the BRect to the location (x,y).
|
|
||||||||||||
|
Moves the BRect to the location (x,y).
|
|
|
Moves the BRect to the location (x,y).
|
|
||||||||||||
|
Moves the BRect to the location (x,y).
|
|
|
Moves the BRect to the location (x,y).
|
|
|
Intersection operator. Creates and returns a new BRect that's the intersection of the two operands. The new BRect encloses the area that the two operands have in common. If the two operands don't intersect, the new BRect will be invalid.
|
|
|
|
|
|
|
|
|
Inequality operator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Equality operator.
|
|
|
Union operator. Creates and returns a new BRect that minimally but completely encloses the area defined by both of the operands. The shaded area illustrates the union of the two outlined rectangles: |
|
|
Prints the contents of the BRect object to standard out in the form: "BRect(left, top, right, bottom)" |
|
|
|
|
|
|
|
||||||||||||||||||||
|
Sets the object's rectangle by defining the coordinates of all four sides.
|
|
||||||||||||||||||||
|
|
|
|
Move the LeftBottom rectangle' corner to the BPoint argument; the other corners and sides are modified concomittantly. None of these functions prevents you from creating an invalid rectangle.
|
|
|
Move the LeftTop rectangle' corner to the BPoint argument; the other corners and sides are modified concomittantly. None of these functions prevents you from creating an invalid rectangle.
|
|
|
Move the RightBottom rectangle' corner to the BPoint argument; the other corners and sides are modified concomittantly. None of these functions prevents you from creating an invalid rectangle.
|
|
|
Move the Righttop rectangle' corner to the BPoint argument; the other corners and sides are modified concomittantly. None of these functions prevents you from creating an invalid rectangle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|