Class: TGPointArray

Declaration: PointArray.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TRawArray

Inherited By:

None.

Purpose:

TGPointArray is a low-level class that provides access to linear arrays of TGPoints (2-D ordered points). TGPointArray is used by TGPolyline and TGPolygon.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGPointArray::TGPointArray

  1. TGPointArray (unsigned long size =0)
  2. TGPointArray (const TGPointArray & source)

Interface Category:

API.

Purpose:

  1. Creates an array of TGPoints of the specified size. The points are left uninitialized. Initialization is the responsibility of the class using the points.
  2. Copy constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. You can also call this function directly.

Parameters:

Return Value:

None

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGPointArray::~TGPointArray

~ TGPointArray ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGPointArray::GetPoint

TGPoint GetPoint (unsigned long i) const

Interface Category:

API.

Purpose:

Get the TGPoint at the specified index.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The point at the specified index.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Does not check for indexes that are out of range.

Member Function: TGPointArray::SetPoint

void SetPoint (unsigned long i, const TGPoint & p)

Interface Category:

API.

Purpose:

Sets the TGPoint at the specified index, to the specified point.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Does not check for indexes that are out of range.

Member Function: TGPointArray::GetNumberOfPoints

unsigned long GetNumberOfPoints () const

Interface Category:

API.

Purpose:

Computes the number of points in the TGPointArray.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The number of points in the array.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGPointArray::GetBounds

TGRect GetBounds () const

Interface Category:

API.

Purpose:

Creates a TGRect that bounds the points in the TGPointArray.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.