| Class Overview |
inline BPoint(float x,
float y);
inline BPoint(const BPoint& point);
inline BPoint();
Creates a new BPoint
object that corresponds to the
point (x
, y
), or
BPoint
that's copied from point. If no coordinate values are assigned, the
BPoint
's location is indeterminate.
See also:
Set()
,
the assignment operator
void ConstrainTo(BRect
rect);
Ensures that the BPoint
lies within rect
.
If it's already contained in
the rectangle, the BPoint
is unchanged; otherwise, it's moved to the
rect
's nearest edge.
See also:
BRect::Contains()
void PrintToStream() const;
Prints the BPoint
's coordinates to standard output in the form:
"BPoint
(x, y)"
inline BPoint& operator =(const BPoint& from);
Copies from's coordinate data into the left-side object.
bool operator ==(BPoint) const;
bool operator !=(BPoint) const;
==
returns true
if
the two objects' point exactly coincide.
!=
returns true
if
the two objects' points don't coincide.
BPoint operator +(const BPoint& ) const;
BPoint operator +=(const BPoint& ) const;
+
creates and returns a new BPoint
that adds the two operands together.
The new object's x coordinate is the sum of the operands' x values; its y
value is the sum of the operands' y values.
+=
adds the operands together and stores the result in the left operand.
BPoint operator -(const BPoint& ) const;
BPoint operator -=(const BPoint& ) const;
-
creates and returns a new BPoint
that subtracts the right operand from
the left. The new object's x coordinate is the difference between the
operands' x values; its y value is the difference between the operands' y
values.
-=
performs the subtraction and stores the result in the left operand.