Class: TLocalClipAreaSnapshot

Declaration: LocalClipAreaSnapshot.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

This class allows the client of a TGrafPort to extract a copy (or snapshot) of the clip area in view coordinates. It does this by accessing the clip state in the grafstate, copying the area, and inverse transforming it by the matrix in the view matrix state. The term snapshot is used to remind you that, under conditions of multithreading, the clip area might be out of date (stale) the moment it is returned by this class. Thus, it is useful only in situations where stale information is not destructive. The main use of this class is to optimize drawing of the graphic elements that fall within the bounding rectangle of the clip area.

Instantiation:

Allocate on the heap or the stack (although the stack is recommended).

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TLocalClipAreaSnapshot::TLocalClipAreaSnapshot

  1. TLocalClipAreaSnapshot (const TGrafPort & port)
  2. TLocalClipAreaSnapshot (const TLocalClipAreaSnapshot &)

Interface Category:

API.

Purpose:

  1. Creates an clip area snapshot object that gets the appropriate area out of the port to be returned by GetClipArea.
  2. Copy constructor.

Calling Context:

  1. Call to get the clip area out of the port.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalClipAreaSnapshot::~TLocalClipAreaSnapshot

virtual ~ TLocalClipAreaSnapshot ()

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: TLocalClipAreaSnapshot::GetClipArea

TGArea GetClipArea () const

Interface Category:

API.

Purpose:

Gets the clip area in view coordinates.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the clip area in view coordinates.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalClipAreaSnapshot::operator=

TLocalClipAreaSnapshot & operator =(const TLocalClipAreaSnapshot &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

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.