A Sprite Location. More...
#include <ISprite.h>
Public Member Functions | |
DGNPLATFORM_EXPORT | SpriteLocation () |
DGNPLATFORM_EXPORT void | Activate (ISpriteP sprite, ViewportP viewport, DPoint3dCR location, int transparency) |
Activate this Sprite to show a specific Sprite Definition at a specific location in a Viewport. More... | |
DGNPLATFORM_EXPORT void | Deactivate () |
Deactivate an active Sprite Location. More... | |
DGNPLATFORM_EXPORT void | DecorateViewport (ViewportP) |
If this Sprite Location is active for the specified Viewport, draw its Sprite Definition at the current location. More... | |
bool | IsActive () const |
Determine whether this Sprite Location is currently active. More... | |
DPoint3dR | GetLocation () |
Get the sprite's location, if this SpriteLocation is active. More... | |
ISpriteP | GetSprite () |
Get the ISprite value, if this SpriteLocation is active. More... | |
![]() | |
void * | operator new (size_t size) |
void | operator delete (void *rawMemory, size_t size) |
UInt32 | AddRef () const |
UInt32 | Release () const |
RefCounted () | |
RefCounted (RefCounted const &rhs) | |
RefCounted & | operator= (RefCounted const &rhs) |
UInt32 | GetRefCount () const |
Additional Inherited Members | |
![]() | |
virtual | ~RefCounted () |
![]() | |
virtual | ~IRefCounted () |
void * | operator new (size_t size) |
void | operator delete (void *rawMemory, size_t size) |
A Sprite Location.
Sprites generally move around on the screen and this object holds the current location and current Sprite Definition for an image of a sprite within a Viewport. SpriteLocations can be either inactive (not visible) or active.
A SpriteLocation can also specify that a Sprite Definition should be drawn partially transparent so that you can "see through" the Sprite.
DGNPLATFORM_EXPORT void Activate | ( | ISpriteP | sprite, |
ViewportP | viewport, | ||
DPoint3dCR | location, | ||
int | transparency | ||
) |
Activate this Sprite to show a specific Sprite Definition at a specific location in a Viewport.
This call does not display the Sprite Definition in the Viewport. Rather, subsequent calls to DecorateViewport from within an IViewDecoration will show the Sprite. This Sprite Location remains active until Deactivate is called.
[in] | sprite | The Sprite Definition to draw at this SpriteLocation |
[in] | viewport | The Viewport onto which the Sprite Definition is drawn |
[in] | location | The x,y posistion in DgnCoordSystem::View |
[in] | transparency | The transparency to draw the Sprite (0=opaque, 255=invisible) |
DGNPLATFORM_EXPORT void Deactivate | ( | ) |
Deactivate an active Sprite Location.
After this call, calls to DecorateViewport for this Sprite Location will do nothing until it is re-Activated.
DGNPLATFORM_EXPORT void DecorateViewport | ( | ViewportP | ) |
If this Sprite Location is active for the specified Viewport, draw its Sprite Definition at the current location.
Otherwise, this method does nothing.
DPoint3dR GetLocation | ( | ) |
Get the sprite's location, if this SpriteLocation is active.
ISpriteP GetSprite | ( | ) |
Get the ISprite value, if this SpriteLocation is active.
bool IsActive | ( | ) | const |
Determine whether this Sprite Location is currently active.
References NULL.