com.esri.arcgis.display
Interface IDynamicGlyph

All Superinterfaces:
Serializable
All Known Implementing Classes:
DynamicGlyph, IDynamicGlyphProxy

public interface IDynamicGlyph
extends Serializable

Provides access to handle to a resource that is used to render a dynamic symbol.

Remarks

A Dynamic Glyph is a handle to a graphic resource that can be used by the Dynamic Symbol in order to render the Dynamic Symbol. Use the Dynamic Glyph Factory in order to create and delete Dynamic Glyphs.

In order to render a Dynamic Symbol using a Dynamic Glyph, use the IDynamicSymbolProperties.DynamicGlyph Property.

It is important to correctly manage the Dynamic Glyphs, in order to minimize the application memory usage. Incorrect management of Dynamic Glyphs will lead to over consumption of resources, and might result in poor performance and even application crash. Try to minimize the Dynamic Glyphs creation and reuse created Dynamic Glyphs as much as possible. For example, create a Dynamic Glyph from a white symbol, set the Dynamic Symbol’s glyph property to use the created Dynamic Glyph, and use the Dynamic Symbol’s color and scale properties, to render the Dynamic Symbol (that uses one created Dynamic Glyph) in different colors and sizes.

When a Dynamic Glyph is not in use anymore, use the IDynamicGlyphFactory.DeleteDynamicGlyph method to release the Dynamic Glyph’s resources.

Product Availability

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


Method Summary
 void getAnchor(float[] xAnchor, float[] yAnchor)
          Indicates the origin of the glyph from the the bottom left.
 int getGlyphType()
          Indicates the type of dynamic glyph.
 void queryDimensions(float[] width, float[] height)
          Returns the width and height, in pixels, of the glyph.
 void setAnchor(float xAnchor, float yAnchor)
          Indicates the origin of the glyph from the the bottom left.
 

Method Detail

getGlyphType

int getGlyphType()
                 throws IOException,
                        AutomationException
Indicates the type of dynamic glyph.

Remarks

Indicates whether the Dynamic Glyph is of type Marker, Text, Line, or Fill.

Product Availability

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

Returns:
A com.esri.arcgis.display.esriDynamicGlyphType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryDimensions

void queryDimensions(float[] width,
                     float[] height)
                     throws IOException,
                            AutomationException
Returns the width and height, in pixels, of the glyph. The width of the text glyph will be the width of the space character.

Remarks

Retrieves the Dynamic Glyph’s actual size in pixels.

For Dynamic Text Glyphs, the height is the height of the font, and the width is the width of the space character. Use IDynamicSymbolProperties2.GetTextSize method to get the actual pixel size of a specific string (with a specific Dynamic Text Symbol).

Product Availability

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

Parameters:
width - The width (in/out: use single element array)
height - The height (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAnchor

void getAnchor(float[] xAnchor,
               float[] yAnchor)
               throws IOException,
                      AutomationException
Indicates the origin of the glyph from the the bottom left.

Remarks

The anchor is an offset value, relative to the glyph’s lower left corner, that defines the anchor point (hot point) of the glyph. For example, for a glyph that represents an arrow, use the offset from the lower left glyph to the arrow’s base point as the anchor of the glyph.

The X values grow towards the right, and the Y values grow towards the top.

Product Availability

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

Parameters:
xAnchor - The xAnchor (in/out: use single element array)
yAnchor - The yAnchor (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAnchor

void setAnchor(float xAnchor,
               float yAnchor)
               throws IOException,
                      AutomationException
Indicates the origin of the glyph from the the bottom left.

Remarks

The anchor is an offset value, relative to the glyph’s lower left corner, that defines the anchor point (hot point) of the glyph. For example, for a glyph that represents an arrow, use the offset from the lower left glyph to the arrow’s base point as the anchor of the glyph.

The X values grow towards the right, and the Y values grow towards the top.

Product Availability

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

Parameters:
xAnchor - The xAnchor (in)
yAnchor - The yAnchor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.