Class: TSprite

Declaration: Sprites.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TCompositingLayer

Inherited By:

TCompoundGraphicSprite TGraphicSprite

Purpose:

TSprite is an abstract base class that represents a graphic that floats over the desktop. It is derived from TCompositingLayer in order to know whether to display itself on top of or underneath the various graphical objects on the desktop. Sprites are device independent.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

TGraphicSprite is the concrete class used to represent sprites that are drawn using derived classes of MGraphic.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TSprite::~TSprite

virtual ~ TSprite ()

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: TSprite::SetLocation

virtual void SetLocation (const TGPoint & worldCoordinate)

Interface Category:

API.

Purpose:

Sets the location of the sprite to the given world coordinate value.

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.

Member Function: TSprite::GetLocation

TGPoint GetLocation () const

Interface Category:

API.

Purpose:

Returns the location of the sprite in world coordinates.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a TGPoint that represents the location of the sprite in world coordinates.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSprite::SetVisibility

virtual void SetVisibility (bool)

Interface Category:

API.

Purpose:

Sets the visibility of the sprite to the given Boolean. If the Boolean is true, the sprite is visible; if it is false, the sprite is invisible.

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.

Member Function: TSprite::GetVisibility

bool GetVisibility () const

Interface Category:

API.

Purpose:

Returns a Boolean that represents the visibility of the sprite. A value of true means the sprite is visible. A value of false means it is invisible.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the sprite is visible.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSprite::TSprite

  1. TSprite ()
  2. TSprite (const TCompositingLayer &, bool placeNewSpriteAbove =false)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. A constructor that places the sprite either above or below another composited items (such as another sprite).

Calling Context:

  1. Called by the stream-in operators and directly.
  2. 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.