|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.display.IDynamicGlyphFactoryProxy com.esri.arcgis.display.IDynamicGlyphFactory2Proxy
public class IDynamicGlyphFactory2Proxy
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.
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 |
---|
public boolean noncastable
Constructor Detail |
---|
public IDynamicGlyphFactory2Proxy()
public IDynamicGlyphFactory2Proxy(Object obj) throws IOException
IOException
protected IDynamicGlyphFactory2Proxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class IDynamicGlyphFactoryProxy
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class IDynamicGlyphFactoryProxy
IOException
public 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.
getCreatedDynamicGlyphSize
in interface IDynamicGlyphFactory2
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.public 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.
setCreatedDynamicGlyphSize
in interface IDynamicGlyphFactory2
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.public 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.
createDynamicGlyphFromBitmap
in interface IDynamicGlyphFactory2
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 |