Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TPoint Class Reference

Two-point screen coordinate. More...

#include <objects.h>

List of all members.

Public Methods

TPoint& operator+= (const TPoint &adder)
TPoint& operator-= (const TPoint &subber)

Public Attributes

int x
int y

Friends

TPoint operator- (const TPoint &one, const TPoint &two)
TPoint operator+ (const TPoint &one, const TPoint &two)
int operator== (const TPoint &one, const TPoint &two)
int operator!= (const TPoint &one, const TPoint &two)


Detailed Description

A screen coordinate. TPoint implements points on the screen with several overloaded operators for point manipulation.

TPoint is a simple object that can be used to record a coordinate on the screen. For this, two public variables are available: `x' and `y'.

See also:
TRect

Definition at line 28 of file objects.h.


Member Function Documentation

TPoint & TPoint::operator+= ( const TPoint & adder ) [inline]
 

Adds the coordinate of another point to this point. Returns *this.

Definition at line 71 of file objects.h.

TPoint & TPoint::operator-= ( const TPoint & subber ) [inline]
 

Subtracts the coordinate of another point from this point. Returns *this.

Definition at line 78 of file objects.h.


Friends And Related Function Documentation

int operator!= ( const TPoint & one,
const TPoint & two ) [friend]
 

Returns True if two points are not equal (have different coordinate), returns False otherwise.

TPoint operator+ ( const TPoint & one,
const TPoint & two ) [friend]
 

Calculates the sum of two points. Returns a point with the resulting sum.

TPoint operator- ( const TPoint & one,
const TPoint & two ) [friend]
 

Calculates the distance between two points. Returns a point with the resulting difference.

int operator== ( const TPoint & one,
const TPoint & two ) [friend]
 

Returns True if two points are equal (have the same coordinate), returns False otherwise.


Member Data Documentation

int TPoint::x
 

Is the screen column of the point.

Definition at line 64 of file objects.h.

int TPoint::y
 

Is the screen row of the point.

Definition at line 68 of file objects.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:31 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001