Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [CONNECT C++] Sprites

$
0
0

[quote user="wilks"]How do we create Sprites under connect?[/quote]

Search MicroStationAPI help for sprites.  There's quite a bit of useful documentation, including an overview...

Sprites are (typically) small raster images that are drawn "on top" of Viewports by an IViewDecoration.

Their purpose is to draw the user's attention to something of importance.

There are two classes in the Sprites subsystem: ISprite (a Sprite Definition) and SpriteLocation. Sprite Definitions are the images that define the way a type of sprite looks and are generally loaded one time and saved for the rest of a session. A SpriteLocation defines the current position of a single Sprite in a Viewport.

...

#include <ISprite.h>

A Sprite, corresponding to a native Window manager icon.

Generally loaded once at startup via IViewManager::LoadSpriteFromRsrc and saved for the entire session. However, applications can implement this interface on other objects that are able to supply an icon resource.

However, I can't find method IViewManager::LoadSpriteFromRsrc, or anything similar, in any header file.  That begs the question: "How do we load a sprite resource?"

[quote user="wilks"]Is it recommended that we continue using transient elements?[/quote]

Transient elements represent geometry.  Sprites are images, not geometry.  They are used extensively by MicroStation — for example, an element handle is a sprite.

The transient API is more subtle in CONNECT.  You can do things the old way, but new techniques simplify and extend your choices.  You can, for example, draw pure geometry rather than elements.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>