PointF
A point with x and y coordinate.
Header | #include "nativeui/gfx/geometry/point_f.h" |
Namespace | namespace nu |
Type | class |
Constructors
PointF()
Create an empty point.
PointF(float x, float y)
Create a point with coordinates of x
and y
.
Parameters
float
xfloat
y
Methods
float x() const
Return X coordinate.
Return
float
void set_x(float x)
Set X coordinate.
Parameters
float
x
float y() const
Return Y coordinate.
Return
float
void set_y(float y)
Set Y coordinate.
Parameters
float
y
bool IsOrigin() const
Return whether the point is empty.
Return
bool
Vector2dF OffsetFromOrigin() const
Return the Vector2dF
version of the point.
Return
Vector2dF
void Scale(float scale)
Scale the x and y coordinates by scale|
.
Parameters
float
scale
std::string ToString() const
Return string representation of the point.
Return
std::string