- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.geometry.Point Union Reference

The smjg.libs.sdwf.geometry.Point union represents a point in two dimensions defined by integer coordinates. More...

List of all members.

## Public Member Functions
Properties
string | toString ()
| Returns a string representation of this Point.
Operators
Point | opAdd (Vector v)
| Adds a vector to this point.
Point | opSub (Vector v)
| Subtracts a vector from this point.
Vector | opSub (Point p)
| Subtracts a point from this point.
Point | opAddAssign (Vector v)
Point | opSubAssign (Vector v)
## Static Public Member Functions
Pseudo-Constructors
static Point | opCall (int x, int y)
| Constructs a Point with the given coordinates.
## Public Attributes
POINT | pt
| This point as a Windows `POINT` structure.
int | x
int | y

## Detailed Description

The smjg.libs.sdwf.geometry.Point union represents a point in two dimensions defined by integer coordinates.

This type is a wrapper around the Windows API `POINT` structure.

## Member Function Documentation

static Point smjg.libs.sdwf.geometry.Point.opCall | ( | int | x,
|  | int | y |
| ) |  |  | `[static]`

Constructs a Point with the given coordinates.

Returns:
  the newly constructed Point.

string smjg.libs.sdwf.geometry.Point.toString | ( |  | ) |

Returns a string representation of this Point.

Returns:
  string representation in form (x, y).

Since:
  0.4

Status:
  done

Point smjg.libs.sdwf.geometry.Point.opAdd | ( | Vector | v | ) |

Adds a vector to this point.

(Implementation of `this + v`.

Returns:
  this point displaced by v.

Point smjg.libs.sdwf.geometry.Point.opSub | ( | Vector | v | ) |

Subtracts a vector from this point.

(Implementation of `this - v`.

Returns:
  this point displaced by the vector equal and opposite to v.

Vector smjg.libs.sdwf.geometry.Point.opSub | ( | Point | p | ) |

Subtracts a point from this point.

(Implementation of `this - p`.

Returns:
  the displacement vector of this point from p.

Point smjg.libs.sdwf.geometry.Point.opAddAssign | ( | Vector | v | ) |

Point smjg.libs.sdwf.geometry.Point.opSubAssign | ( | Vector | v | ) |

## Member Data Documentation

int smjg.libs.sdwf.geometry.Point.x

int smjg.libs.sdwf.geometry.Point.y

POINT smjg.libs.sdwf.geometry.Point.pt

This point as a Windows `POINT` structure.

The documentation for this union was generated from the following file:

- geometry.d