com.esri.arcgis.display
Interface IDynamicDisplay

All Superinterfaces:
Serializable
All Known Implementing Classes:
DynamicDisplay, IDynamicDisplayProxy

public interface IDynamicDisplay
extends Serializable

Provides access to Dynamic Display.

Description

IDynamicDisplay interface gives access to drawing methods that render dynamic items using map coordinates, as well as access to an instance of the Dynamic Glyph Factory object. The Dynamic Glyph Factory object is a singleton object, which is used to create and delete dynamic glyphs and then can be used with the dynamic symbols in order to render the Dynamic items.

Remarks

The IDynamicDisplay interface is passed in to the callback draw methods: IDynamicLayer.DrawDynamicLayer, IDynamicMapEvents.BeforeDynamicDraw, and IDynamicMapEvents.AfterDynamicDraw.

The drawing methods can only be used in one of the callback draw methods with the following specific context:

  1. In the IDynamicLayer.DrawDynamicLayer method.
    It is recommended to use the DynamicGlyphFactory in the esriDynamicDrawPhase.esriDDPImmediate dynamic-draw-phase.
  2. IDynamicMapEvents.AfterDynamicDraw method (event handler).
    Only with the dynamic-map-draw-phase esriDynamicMapDrawPhase.esriDMDPDynamicLayers.
  3. IDynamicMapEvents.BeforeDynamicDraw method (event handler).
    Only with the dynamic-map-draw-phase esriDynamicMapDrawPhase.esriDMDPDynamicLayers.

Any usage of the DynamicDisplay drawing API (or OpenGL API) in any other context will result in an unknown behavior.

Product Availability

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


Method Summary
 void drawLine(IPoint startPoint, IPoint endPoint)
          Draws a line between the specified points on the dynamic display.
 void drawMarker(IPoint point)
          Draws a marker at the specified point on the dynamic display.
 void drawMultipleLines(IPointCollection pointCollection)
          Draws specified lines on the dynamic display.
 void drawMultipleMarkers(IPointCollection pointCollection)
          Draws a marker at the specified points on the dynamic display.
 void drawPolygon(IPointCollection pointCollection)
          Draws specified polygon with fill and line on the dynamic display.
 void drawPolyline(IPointCollection pointCollection)
          Draws specified polyline on the dynamic display.
 void drawRectangle(IEnvelope envelope)
          Draws specified rectangle with fill and line on the dynamic display.
 void drawText(IPoint point, String text)
          Draws text at the specified point on the dynamic display.
 IDynamicGlyphFactory getDynamicGlyphFactory()
          Retrieves the dynamic glyph factory.
 

Method Detail

getDynamicGlyphFactory

IDynamicGlyphFactory getDynamicGlyphFactory()
                                            throws IOException,
                                                   AutomationException
Retrieves the dynamic glyph factory.

Remarks

Use the dynamic glyph factory 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.

The Dynamic Glyphs Factory is a singleton object; therefore you can always co-create it in order to use it to create and delete dynamic glyphs.
Performance wise, it is preferable to create the dynamic glyphs in the context of the IDynamicLayer’s DrawDynamicLayer method, in the esriDDPImmediate dynamic-draw-phase, or in the context of the IDynamicMapEvents BeofreDynamicDraw method, in the esriDMDPDynamicLayers dynamic-map-draw-phase, while casting the passed in IDynamicDisplay interface to IDynamicGlyphFactory.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.display.IDynamicGlyphFactory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawMultipleMarkers

void drawMultipleMarkers(IPointCollection pointCollection)
                         throws IOException,
                                AutomationException
Draws a marker at the specified points on the dynamic display.

Remarks

The markers will be rendered according to the current Dynamic Marker Symbol attributes, as described in esriDynamicSymbolType constants.

Using this method is useful when you need to draw multiple markers that look the same in different locations, for example drawing indication markers on a polyline’s or a polygon’s vertices.

Product Availability

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

In order to manage your dynamic items you should keep them in arrays of WKSPoint and have an instance of a Multipoint class (as IPointCollection). In order efficiently update the items you should be using IGeometryBridge2 interface

Parameters:
pointCollection - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawMarker

void drawMarker(IPoint point)
                throws IOException,
                       AutomationException
Draws a marker at the specified point on the dynamic display.

Remarks

The marker will be rendered according to the current Dynamic Marker Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawPolygon

void drawPolygon(IPointCollection pointCollection)
                 throws IOException,
                        AutomationException
Draws specified polygon with fill and line on the dynamic display.

Remarks

The fill will be rendered according to the current Dynamic Fill Symbol attributes, as described in esriDynamicSymbolType constants, and the lines will be rendered according to the current Dynamic Line Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

In order to manage your dynamic polygon, you should keep it as an array of WKSPoint (do not forget to copy the first point at the end of the array) and have an instance of a Polygon geometry class in your application (as IPointCollection). In order efficiently update the polygon geometry you should be using IGeometryBridge2 interface.

Parameters:
pointCollection - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawMultipleLines

void drawMultipleLines(IPointCollection pointCollection)
                       throws IOException,
                              AutomationException
Draws specified lines on the dynamic display.

Remarks

The lines will be rendered according to the current Dynamc Line Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

Parameters:
pointCollection - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawLine

void drawLine(IPoint startPoint,
              IPoint endPoint)
              throws IOException,
                     AutomationException
Draws a line between the specified points on the dynamic display.

Remarks

The line will be rendered according to the current Dynamic Line Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

Parameters:
startPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
endPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawPolyline

void drawPolyline(IPointCollection pointCollection)
                  throws IOException,
                         AutomationException
Draws specified polyline on the dynamic display.

Remarks

The lines will be rendered according to the current Dynamic Line Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

In order to manage your dynamic polyline, you should keep it as an array of WKSPoint and have an instance of a Polyline geometry class in your application (as IPointCollection). In order efficiently update the polyline geometry you should be using IGeometryBridge2 interface

Parameters:
pointCollection - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawRectangle

void drawRectangle(IEnvelope envelope)
                   throws IOException,
                          AutomationException
Draws specified rectangle with fill and line on the dynamic display.

Remarks

Similar to the DrawPolygon method, the fill will be rendered according to the current Dynamic Fill Symbol attributes, and the lines will be rendered according to the current Dynamic Line Symbol attributes, as described in esriDynamicSymbolType constants.

Product Availability

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

Parameters:
envelope - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

drawText

void drawText(IPoint point,
              String text)
              throws IOException,
                     AutomationException
Draws text at the specified point on the dynamic display.

Remarks

The text will be rendered according to the current Dynamic Text Symbol attributes, as described in esriDynamicSymbolType constants.

Using the Dynamic Text Symbol, you can set the text to have a text box that will use the Dynamic Fill Symbol for Background fill, and the Dynamic Line Symbol for outline. Please refer to IDynamicSymbolProperties2.TextBoxUseDynamicFillSymbol and IDynamicSymbolProperties2.TextBoxUseDynamicLineSymbol boolean properties.

Product Availability

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

Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
text - The text (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.