|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.arcgis.interop.Dispatch
com.esri.arcgis.display.IDynamicGlyphFactoryProxy
public class IDynamicGlyphFactoryProxy
Provides access to create dynamic glyphs.
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 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.
| Field Summary |
|---|
| Fields inherited from class com.esri.arcgis.interop.Dispatch |
|---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E |
| Constructor Summary | |
|---|---|
|
IDynamicGlyphFactoryProxy()
|
|
IDynamicGlyphFactoryProxy(Object obj)
|
protected |
IDynamicGlyphFactoryProxy(Object obj,
String iid)
|
| Method Summary | |
|---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
IDynamicGlyph |
createDynamicGlyph(ISymbol symbol)
Creates a dynamic glyph from a symbol. |
IDynamicGlyph |
createDynamicGlyphFromFile(int glyphType,
String fileName,
IColor transparencyColor)
Creates a dynamic glyph from a file. |
void |
deleteDynamicGlyph(IDynamicGlyph glyph)
Deletes the dynamic glyph's resource. |
IDynamicGlyph |
getDynamicGlyph(int groupId,
int glyphType,
int index)
Retrieves a dynamic glyph from a glyph group. |
void |
init(IScreenDisplay screenDisplay)
Initialize the dynamic glyph factory. |
int |
loadDynamicGlyphsGroup(String fileName)
Loads a dynamic glyph group from files. |
void |
readExternal(ObjectInput in)
|
void |
removeListener(String iidStr,
Object theListener)
|
void |
unloadDynamicGlyphsGroup(int groupId)
Unloads a dynamic glyph group, and any corresponding resources. |
void |
writeExternal(ObjectOutput out)
|
| 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, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IDynamicGlyphFactoryProxy()
public IDynamicGlyphFactoryProxy(Object obj)
throws IOException
IOException
protected IDynamicGlyphFactoryProxy(Object obj,
String iid)
throws IOException
IOException| Method Detail |
|---|
public void addListener(String iidStr,
Object theListener,
Object theSource)
throws IOException
addListener in class com.esri.arcgis.interop.DispatchIOException
public void removeListener(String iidStr,
Object theListener)
throws IOException
removeListener in class com.esri.arcgis.interop.DispatchIOException
public void init(IScreenDisplay screenDisplay)
throws IOException,
AutomationException
This method should only be used after co-creating a Dynamic Glyph Factory. There is no need to init a Dynamic Glyph Factory that was retrieved from a Dynamic Display object.
init in interface IDynamicGlyphFactoryscreenDisplay - A reference to a com.esri.arcgis.display.IScreenDisplay (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IDynamicGlyph createDynamicGlyph(ISymbol symbol)
throws IOException,
AutomationException
For monochromatic symbols (symbols that consist of only one color and might even have fixed black pixels), it is advisable to set the Symbol color to white before passing it into the method. When rendering the Dynamic Symbol, using the Dynamic Glyph created using this method, you should then set the color to the desired color. That will result in coloring the white pixels to the desired color, while leaving the black colors black.
createDynamicGlyph in interface IDynamicGlyphFactorysymbol - A reference to a com.esri.arcgis.display.ISymbol (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void deleteDynamicGlyph(IDynamicGlyph glyph)
throws IOException,
AutomationException
It is important to call this method in order to release the Dynamic Glyph’s resources. A Dynamic Glyph object that is destroyed without calling this method might result in memory leaks on the graphic card memory. Also, it is recommended to delete unused Dynamic Glyphs in order to free up Graphic Card memory.
deleteDynamicGlyph in interface IDynamicGlyphFactoryglyph - A reference to a com.esri.arcgis.display.IDynamicGlyph (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IDynamicGlyph createDynamicGlyphFromFile(int glyphType,
String fileName,
IColor transparencyColor)
throws IOException,
AutomationException
Creates a dynamic glyph from an image file. If the image file consists of an alpha channel, the method will honor the alpha values in the alpha channel, otherwise the alpha values will be set to be opaque (255). If the transparency color is not NULL, each pixel that matches the transparencyColor parameter will be transparent (its alpha values in the glyph will be set to 0).
createDynamicGlyphFromFile in interface IDynamicGlyphFactoryglyphType - A com.esri.arcgis.display.esriDynamicGlyphType constant (in)fileName - The fileName (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.
public int loadDynamicGlyphsGroup(String fileName)
throws IOException,
AutomationException
The fileName points to an XML file. This XML file holds information regarding the image files that should be used in order to load the group image, and a database that describes the identity, location, and size of the glyphs in the group.
On success, the method returns the ID of the loaded group. This ID can be used to get a dynamic glyph from the group, using the get property IDynamicGlyphFactory.DynamicGlyph, or unload the glyphs group, using the method IDynamicGlyphFactory.UnloadDynamicGlyphsGroup.
loadDynamicGlyphsGroup in interface IDynamicGlyphFactoryfileName - The fileName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void unloadDynamicGlyphsGroup(int groupId)
throws IOException,
AutomationException
When the Dynamic Glyphs Group is no longer needed, it is important to call this method in order to release the Group’s resources.
Unused Dynamic Glyph Groups that are not unloaded might result in memory leaks on the graphic card memory.
unloadDynamicGlyphsGroup in interface IDynamicGlyphFactorygroupId - The groupId (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IDynamicGlyph getDynamicGlyph(int groupId,
int glyphType,
int index)
throws IOException,
AutomationException
getDynamicGlyph in interface IDynamicGlyphFactorygroupId - The groupId (in)glyphType - A com.esri.arcgis.display.esriDynamicGlyphType constant (in)index - The index (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class com.esri.arcgis.interop.DispatchIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class com.esri.arcgis.interop.DispatchIOException
ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||