|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDynamicGlyphFactory2
Provides access to create dynamic glyphs.
This interface is new at ArcGIS 9.3. It supersedes IDynamicGlyphFactory.
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.
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 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.
Method Summary | |
---|---|
IDynamicGlyph |
createDynamicGlyphFromBitmap(int glyphType,
int hBmp,
boolean preserveAlphaChannel,
IColor transparencyColor)
Create a dynamic glyph from a bitmap handle. |
void |
getCreatedDynamicGlyphSize(int glyphType,
int[] sizeX,
int[] sizeY)
Indicates the texture size of the created dynamic glyph. |
void |
setCreatedDynamicGlyphSize(int glyphType,
int sizeX,
int sizeY)
Indicates the texture size of the created dynamic glyph. |
Methods inherited from interface com.esri.arcgis.display.IDynamicGlyphFactory |
---|
createDynamicGlyph, createDynamicGlyphFromFile, deleteDynamicGlyph, getDynamicGlyph, init, loadDynamicGlyphsGroup, unloadDynamicGlyphsGroup |
Method Detail |
---|
void getCreatedDynamicGlyphSize(int glyphType, int[] sizeX, int[] sizeY) throws IOException, AutomationException
The Created Dynamic Glyph Size values determine the size of the texture that will be created when the CreateDynamicGlyph method will be used. These values need to be a power of two (2, 4, 8, 16, 32, 64, 128, 256, etc). If they are not a power of two, the values will be snapped to the lower power of two values. For example, a value of 33 will be adjusted to be 32.
glyphType
- A com.esri.arcgis.display.esriDynamicGlyphType constant (in)sizeX
- The sizeX (in/out: use single element array)sizeY
- The sizeY (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCreatedDynamicGlyphSize(int glyphType, int sizeX, int sizeY) throws IOException, AutomationException
The Created Dynamic Glyph Size values determine the size of the texture that will be created when the CreateDynamicGlyph method will be used. These values need to be a power of two (2, 4, 8, 16, 32, 64, 128, 256, etc). If they are not a power of two, the values will be snapped to the lower power of two values. For example, a value of 33 will be adjusted to be 32.
glyphType
- A com.esri.arcgis.display.esriDynamicGlyphType constant (in)sizeX
- The sizeX (in)sizeY
- The sizeY (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IDynamicGlyph createDynamicGlyphFromBitmap(int glyphType, int hBmp, boolean preserveAlphaChannel, IColor transparencyColor) throws IOException, AutomationException
Creates a dynamic glyph from a handle to a bitmap. If preserveAlphaChannel parameter is set, the method will honor the alpha values in the alpha channel, otherwise the alpha values will be set to to be opaque (255). If the transparency color parameter is not NULL, each pixel that matches the transparencyColor will be transparent (its alpha values in the glyph will be set to 0).
To get a handle to the bitmap (hBmp) you can use RasterPicture::loadPicture() or BasicRasterPicture::loadPicture(). These methods return an IPicture which has a getHandle() method that can be used to get the handle.
glyphType
- A com.esri.arcgis.display.esriDynamicGlyphType constant (in)hBmp
- The hBmp (A COM typedef) (in)preserveAlphaChannel
- The preserveAlphaChannel (in)transparencyColor
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |