Public Member Functions | List of all members
SpriteLocation Struct Reference

A Sprite Location. More...

#include <ISprite.h>

Inheritance diagram for SpriteLocation:
RefCountedBase RefCounted< IRefCounted > IRefCounted

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...
 
- Public Member Functions inherited from RefCounted< IRefCounted >
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)
 
RefCountedoperator= (RefCounted const &rhs)
 
UInt32 GetRefCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted< IRefCounted >
virtual ~RefCounted ()
 
- Protected Member Functions inherited from IRefCounted
virtual ~IRefCounted ()
 
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 

Detailed Description

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.

Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Constructor & Destructor Documentation

Member Function Documentation

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.

Parameters
[in]spriteThe Sprite Definition to draw at this SpriteLocation
[in]viewportThe Viewport onto which the Sprite Definition is drawn
[in]locationThe x,y posistion in DgnCoordSystem::View
[in]transparencyThe 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.

Note
This method is ONLY valid from within an IViewDecoration::DoDecoration event callback.
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.

Returns
true if this Sprite Location is currently active.

References NULL.


The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.