com.esri.arcgis.display
Class IDynamicGlyphFactory2Proxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.display.IDynamicGlyphFactoryProxy
          extended by com.esri.arcgis.display.IDynamicGlyphFactory2Proxy
All Implemented Interfaces:
IDynamicGlyphFactory, IDynamicGlyphFactory2, Externalizable, Serializable

public class IDynamicGlyphFactory2Proxy
extends IDynamicGlyphFactoryProxy
implements IDynamicGlyphFactory2, Serializable

Provides access to create dynamic glyphs.

Description

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.

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 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.

Product Availability

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

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IDynamicGlyphFactory2Proxy()
           
  IDynamicGlyphFactory2Proxy(Object obj)
           
protected IDynamicGlyphFactory2Proxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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 removeListener(String iidStr, Object theListener)
           
 void setCreatedDynamicGlyphSize(int glyphType, int sizeX, int sizeY)
          Indicates the texture size of the created dynamic glyph.
 
Methods inherited from class com.esri.arcgis.display.IDynamicGlyphFactoryProxy
createDynamicGlyph, createDynamicGlyphFromFile, deleteDynamicGlyph, getDynamicGlyph, init, loadDynamicGlyphsGroup, unloadDynamicGlyphsGroup
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.display.IDynamicGlyphFactory
createDynamicGlyph, createDynamicGlyphFromFile, deleteDynamicGlyph, getDynamicGlyph, init, loadDynamicGlyphsGroup, unloadDynamicGlyphsGroup
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IDynamicGlyphFactory2Proxy

public IDynamicGlyphFactory2Proxy()

IDynamicGlyphFactory2Proxy

public IDynamicGlyphFactory2Proxy(Object obj)
                           throws IOException
Throws:
IOException

IDynamicGlyphFactory2Proxy

protected IDynamicGlyphFactory2Proxy(Object obj,
                                     String iid)
                              throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class IDynamicGlyphFactoryProxy
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class IDynamicGlyphFactoryProxy
Throws:
IOException

getCreatedDynamicGlyphSize

public void getCreatedDynamicGlyphSize(int glyphType,
                                       int[] sizeX,
                                       int[] sizeY)
                                throws IOException,
                                       AutomationException
Indicates the texture size of the created dynamic glyph.

Remarks

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.

Product Availability

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

Specified by:
getCreatedDynamicGlyphSize in interface IDynamicGlyphFactory2
Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCreatedDynamicGlyphSize

public void setCreatedDynamicGlyphSize(int glyphType,
                                       int sizeX,
                                       int sizeY)
                                throws IOException,
                                       AutomationException
Indicates the texture size of the created dynamic glyph.

Remarks

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.

Product Availability

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

Specified by:
setCreatedDynamicGlyphSize in interface IDynamicGlyphFactory2
Parameters:
glyphType - A com.esri.arcgis.display.esriDynamicGlyphType constant (in)
sizeX - The sizeX (in)
sizeY - The sizeY (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createDynamicGlyphFromBitmap

public IDynamicGlyph createDynamicGlyphFromBitmap(int glyphType,
                                                  int hBmp,
                                                  boolean preserveAlphaChannel,
                                                  IColor transparencyColor)
                                           throws IOException,
                                                  AutomationException
Create a dynamic glyph from a bitmap handle.

Remarks

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).

Product Availability

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

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.

Specified by:
createDynamicGlyphFromBitmap in interface IDynamicGlyphFactory2
Parameters:
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)
Returns:
A reference to a com.esri.arcgis.display.IDynamicGlyph
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.