ArcObjects Library Reference (Display)  

IDynamicGlyphFactory Interface

Provides access to create dynamic glyphs. Note: the IDynamicGlyphFactory interface has been superseded byIDynamicGlyphFactory2. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Use the dynamic glyph factory singleton object in order to create and delete dynamic glyphs. The dynamic glyphs can be used with the Dynamic Symbols in order to render Dynamic Items.

Members

Description
Method CreateDynamicGlyph Creates a dynamic glyph from a symbol.
Method CreateDynamicGlyphFromFile Creates a dynamic glyph from a file.
Method DeleteDynamicGlyph Deletes the dynamic glyph's resource.
Read-only property DynamicGlyph Retrieves a dynamic glyph from a glyph group.
Method Init Initialize the dynamic glyph factory.
Method LoadDynamicGlyphsGroup Loads a dynamic glyph group from files.
Method UnloadDynamicGlyphsGroup Unloads a dynamic glyph group, and any corresponding resources.

CoClasses that implement IDynamicGlyphFactory

CoClasses and Classes Description
DynamicDisplay (esriCarto) Dynamic display class, used by the dynamic map.
DynamicGlyphFactory (esriCarto) Dynamic glyph factory class.

Remarks

Dynamic Glyph Factory:

The Dynamic Glyph Factory is a singleton object; therefore you can always co-create it in order to use it to create and delete dynamic glyphs. With Respect to performance, it is preferable to create the dynamic glyphs in the context of the IDynamicLayer’s DrawDynamicLayer method, in the esriDDPImmediate draw phase, or in the context of the IDynamicMapEvents BeforeDynamicDraw or AfterDynamicDraw method, while casting the passed in IDynamicDisplay interface to IDynamicGlyphFactory.

When co-creating the DynamicGlyphFactory singleton in a DotNet application, use the Activator class instead of using the new keyword:

Type t = Type.GetTypeFromProgID("esriCarto.DynamicGlyphFactory");

System.Object dynamicGlyphFactoryObject = Activator.CreateInstance(t);

IDynamicGlyphFactory2 dynamicGlyphFactory = dynamicGlyphFactoryObject as IDynamicGlyphFactory2;

See also: System.__ComObject and casting to strongly typed RCWs

Glyph Groups:

A Dynamic Glyphs Group is a container that holds multiple glyphs. It is composed of a bitmap and a database that holds information about the group and the elements (glyphs and glyphs’ items) in the group. The image is a mosaic of sub-images of icons (marker glyphs), lines (line glyphs), and groups of characters (each group composes a text glyph).
The bitmap holds color information (Red, Green, Blue, and Alpha values) for each pixel. The bitmap can be loaded from one of two file images - one that holds the RGB values, and a second one that holds the ALPHA values, or from a single file image that holds RGBA values.
The Glyphs Group database is loaded from an XML file. This XML file holds general information about the group, and specific location and size information for each of the items and elements of the group.
A new Glyphs Group can be loaded using the IDynamicGlyphFactory.LoadDynamicGlyphsGroup method.
Glyphs Group ID 1 is reserved to be the default Glyphs Group, and supplies a default set of Dynamic Glyphs.

.NET Snippets

Create Dynamic Marker Glyph from Image | Create Dynamic Glyph from Symbol |

.NET Samples

Dynamic logo (Code Files: DynamicLogo) | Simple dynamic display application (Code Files: MyDynamicLayer) |

.NET Related Topics

Getting started with dynamic display |