PointF

A point with x and y coordinate.

Header#include "nativeui/gfx/geometry/point_f.h"
Namespacenamespace nu
Typeclass

Constructors

PointF()

Create an empty point.

PointF(float x, float y)

Create a point with coordinates of x and y.

Parameters

Methods

float x() const

Return X coordinate.

Return

float

void set_x(float x)

Set X coordinate.

Parameters

float y() const

Return Y coordinate.

Return

float

void set_y(float y)

Set Y coordinate.

Parameters

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

std::string ToString() const

Return string representation of the point.

Return

std::string