TPoint Class Reference

class TPoint

Stores a two-dimensional point in Cartesian co-ordinates.

Its data members (iX and iY) are public and can be manipulated directly, or by means of the functions provided. Functions are provided to set and manipulate the point, and to compare points for equality.

Public Member Functions
TPoint(TUninitialized)
TPoint()
TPoint(TInt, TInt)
IMPORT_C TSizeAsSize()
IMPORT_C voidSetXY(TInt, TInt)
IMPORT_C TBooloperator!=(const TPoint &)
IMPORT_C TPointoperator+(const TPoint &)
IMPORT_C TPointoperator+(const TSize &)
IMPORT_C TPoint &operator+=(const TPoint &)
IMPORT_C TPoint &operator+=(const TSize &)
IMPORT_C TPointoperator-(const TPoint &)
IMPORT_C TPointoperator-(const TSize &)
IMPORT_C TPointoperator-()
IMPORT_C TPoint &operator-=(const TPoint &)
IMPORT_C TPoint &operator-=(const TSize &)
IMPORT_C TBooloperator==(const TPoint &)
Public Member Enumerations
enumTUninitialized { EUninitialized }
Public Attributes
TInt iX
TInt iY

Constructor & Destructor Documentation

TPoint(TUninitialized)

TPoint(TUninitialized)[inline]

Constructs default point, initialising its iX and iY members to zero.

Parameters

TUninitialized

TPoint()

TPoint()[inline]

Constructs default point, initialising its iX and iY members to zero.

TPoint(TInt, TInt)

TPoint(TIntaX,
TIntaY
)[inline]

Constructs a point with the specified x and y co-ordinates.

Parameters

TInt aXThe x co-ordinate value.
TInt aYThe y co-ordinate value.

Member Functions Documentation

AsSize()

IMPORT_C TSizeAsSize()const

SetXY(TInt, TInt)

IMPORT_C voidSetXY(TIntaX,
TIntaY
)

Parameters

TInt aX
TInt aY

operator!=(const TPoint &)

IMPORT_C TBooloperator!=(const TPoint &aPoint)const

Parameters

const TPoint & aPoint

operator+(const TPoint &)

IMPORT_C TPointoperator+(const TPoint &aPoint)const

Parameters

const TPoint & aPoint

operator+(const TSize &)

IMPORT_C TPointoperator+(const TSize &aSize)const

Parameters

const TSize & aSize

operator+=(const TPoint &)

IMPORT_C TPoint &operator+=(const TPoint &aPoint)

Parameters

const TPoint & aPoint

operator+=(const TSize &)

IMPORT_C TPoint &operator+=(const TSize &aSize)

Parameters

const TSize & aSize

operator-(const TPoint &)

IMPORT_C TPointoperator-(const TPoint &aPoint)const

Parameters

const TPoint & aPoint

operator-(const TSize &)

IMPORT_C TPointoperator-(const TSize &aSize)const

Parameters

const TSize & aSize

operator-()

IMPORT_C TPointoperator-()const

operator-=(const TPoint &)

IMPORT_C TPoint &operator-=(const TPoint &aPoint)

Parameters

const TPoint & aPoint

operator-=(const TSize &)

IMPORT_C TPoint &operator-=(const TSize &aSize)

Parameters

const TSize & aSize

operator==(const TPoint &)

IMPORT_C TBooloperator==(const TPoint &aPoint)const

Parameters

const TPoint & aPoint

Member Enumerations Documentation

Enum TUninitialized

Enumerators

EUninitialized

Member Data Documentation

TInt iX

TInt iX

The x co-ordinate.

TInt iY

TInt iY

The y co-ordinate.