Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TPoint Class Reference

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

#include <e32cmn.h>

Public Types

enum  TUninitialized { EUninitialized }
 

Public Member Functions

 TPoint (TUninitialized)
 Constructs default point, initialising its iX and iY members to zero.
 
 TPoint ()
 Constructs default point, initialising its iX and iY members to zero.
 
 TPoint (TInt aX, TInt aY)
 Constructs a point with the specified x and y co-ordinates.
 
IMPORT_C TBool operator== (const TPoint &aPoint) const
 Compares two points for equality.
 
IMPORT_C TBool operator!= (const TPoint &aPoint) const
 Compares two points for inequality.
 
IMPORT_C TPoint & operator-= (const TPoint &aPoint)
 TPoint subtraction assignment operator.
 
IMPORT_C TPoint & operator+= (const TPoint &aPoint)
 TPoint addition assignment operator.
 
IMPORT_C TPoint & operator-= (const TSize &aSize)
 TSize subtraction assignment operator.
 
IMPORT_C TPoint & operator+= (const TSize &aSize)
 TSize addition assignment operator.
 
IMPORT_C TPoint operator- (const TPoint &aPoint) const
 TPoint subtraction operator.
 
IMPORT_C TPoint operator+ (const TPoint &aPoint) const
 The operator adds the specified point to this point, and returns the resulting value.
 
IMPORT_C TPoint operator- (const TSize &aSize) const
 TSize subtraction operator.
 
IMPORT_C TPoint operator+ (const TSize &aSize) const
 TSize addition operator.
 
IMPORT_C TPoint operator- () const
 Unary minus operator.
 
IMPORT_C void SetXY (TInt aX, TInt aY)
 Sets the x and y co-ordinates for this point.
 
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.
 

Public Attributes

TInt iX
 The x co-ordinate.
 
TInt iY
 The y co-ordinate.
 

Detailed Description

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.

API status
Published to all clients. Released API.

Definition at line 2284 of file e32cmn.h.

Member Enumeration Documentation

◆ TUninitialized

Enumerator
EUninitialized 

Definition at line 2288 of file e32cmn.h.

Constructor & Destructor Documentation

◆ TPoint() [1/3]

TPoint::TPoint ( TUninitialized  )
inline

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

Definition at line 2292 of file e32cmn.h.

◆ TPoint() [2/3]

TPoint::TPoint ( )
inline

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

(generated from Symbian Developer Library)

◆ TPoint() [3/3]

TPoint::TPoint ( TInt  aX,
TInt  aY 
)
inline

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

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

(generated from Symbian Developer Library)

Member Function Documentation

◆ AsSize()

IMPORT_C TSize TPoint::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.

(generated from Symbian Developer Library)

◆ operator!=()

IMPORT_C TBool TPoint::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.

Parameters
aPointThe point to be compared with this point.

(generated from Symbian Developer Library)

◆ operator+() [1/2]

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

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

Parameters
aPointThe point to be added to this point.

(generated from Symbian Developer Library)

◆ operator+() [2/2]

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

TSize addition operator.

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

The operation proceeds by:

  1. adding the width value of the TSize to the x co-ordinate value
  2. adding the height value of the TSize to the y co-ordinate value.
Parameters
aSizeThe TSize to be added to this TPoint.

(generated from Symbian Developer Library)

◆ operator+=() [1/2]

IMPORT_C TPoint & 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.

Parameters
aPointThe point to be added.

(generated from Symbian Developer Library)

◆ operator+=() [2/2]

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

TSize addition assignment operator.

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

The operation proceeds by:

  1. adding the width value of the TSize to the x co-ordinate value
  2. adding the height value of the TSize to the y co-ordinate value
Parameters
aSizeThe TSize to be added to this point.

(generated from Symbian Developer Library)

◆ operator-() [1/3]

IMPORT_C TPoint TPoint::operator- ( ) const

Unary minus operator.

The operator returns the negation of this point.

(generated from Symbian Developer Library)

◆ operator-() [2/3]

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

TPoint subtraction operator.

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

Parameters
aPointThe point to be subtracted from this point.

(generated from Symbian Developer Library)

◆ operator-() [3/3]

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

TSize subtraction operator.

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

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.
Parameters
aSizeThe TSize to be subtracted.

(generated from Symbian Developer Library)

◆ operator-=() [1/2]

IMPORT_C TPoint & 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.

Parameters
aPointThe point to be subtracted.

(generated from Symbian Developer Library)

◆ operator-=() [2/2]

IMPORT_C TPoint & 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
Parameters
aSizeThe TSize to be subtracted.

(generated from Symbian Developer Library)

◆ operator==()

IMPORT_C TBool TPoint::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.

Parameters
aPointThe point to be compared with this point.

(generated from Symbian Developer Library)

◆ SetXY()

IMPORT_C void TPoint::SetXY ( TInt  aX,
TInt  aY 
)

Sets the x and y co-ordinates for this point.

Parameters
aXThe value to assign to the x co-ordinate.
aYThe value to assign to the y co-ordinate.

(generated from Symbian Developer Library)

Member Data Documentation

◆ iX

TInt TPoint::iX

The x co-ordinate.

Definition at line 2313 of file e32cmn.h.

◆ iY

TInt TPoint::iY

The y co-ordinate.

Definition at line 2317 of file e32cmn.h.


The documentation for this class was generated from the following files: