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 TSize | AsSize() |

IMPORT_C void | SetXY(TInt, TInt) |

IMPORT_C TBool | operator!=(const TPoint &) |

IMPORT_C TPoint | operator+(const TPoint &) |

IMPORT_C TPoint | operator+(const TSize &) |

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

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

IMPORT_C TPoint | operator-(const TPoint &) |

IMPORT_C TPoint | operator-(const TSize &) |

IMPORT_C TPoint | operator-() |

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

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

IMPORT_C TBool | operator==(const TPoint &) |

Public Member Enumerations | |
---|---|

enum | TUninitialized { EUninitialized } |

Public Attributes | |
---|---|

TInt | iX |

TInt | iY |

TPoint | ( | TUninitialized | ) | [inline] |

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

TUninitialized |

TPoint | ( | TInt | aX, |

TInt | aY | ||

) | [inline] |

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

IMPORT_C TSize | AsSize | ( | ) | const |

Gets the size of the rectangle whose top left hand corner is the origin of the screen co-ordinates and whose bottom right hand corner is this point.

IMPORT_C TBool | operator!= | ( | const TPoint & | aPoint | ) | const |

Compares two points for inequality.

For two points to be unequal, either their x or their y co-ordinate values must be different.

const TPoint & aPoint | The point to be compared with this point. |

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

The operator adds the specified point to this point, and returns the resulting value.

const TPoint & aPoint | The point to be added to this point. |

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

const TSize & aSize | The TSize to be added to this TPoint. |

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

TPoint addition assignment operator.

The operator adds the specified point to this point, and assigns the result back to this point.

const TPoint & aPoint | The point to be added. |

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

const TSize & aSize | The TSize to be added to this point. |

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

TPoint subtraction operator.

The operator subtracts the specified point from this point, and returns the resulting value.

const TPoint & aPoint | The point to be subtracted from this point. |

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

const TSize & aSize | The TSize to be subtracted. |

IMPORT_C TPoint | operator- | ( | ) | const |

Unary minus operator.

The operator returns the negation of this point.

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

TPoint subtraction assignment operator.

The operator subtracts the specified point from this point, and assigns the result back to this point.

const TPoint & aPoint | The point to be subtracted. |

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

TSize subtraction assignment operator.

The operator subtracts the specified TSize from this point, and assigns the result back to this point.

The operation proceeds by:

1. subtracting the width value of the TSize from the x co-ordinate value

2. subtracting the height value of the TSize from the y co-ordinate value

const TSize & aSize | The TSize to be subtracted. |

IMPORT_C TBool | operator== | ( | const TPoint & | aPoint | ) | const |

Compares two points for equality.

For two points to be equal, both their x and y co-ordinate values must be equal.

const TPoint & aPoint | The point to be compared with this point. |

Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).

All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.