ArcObjects Library Reference (Display)  

IDisplay Interface

Provides access to members that control the Display.

Product Availability

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

When To Use

Use the IDisplay interface to draw points, lines, polygons, rectangles, and text on a device.

Members

Description
Read-only property ClipEnvelope The bounds of the invalid region. Use after StartDrawing and before FinishDrawing.
Read-only property ClipEnvelopes The invalid region as a set of envelopes. Use after StartDrawing and before FinishDrawing.
Read/write property ClipGeometry User-specified clip shape. This shape is merged with the invalid region to arrive at the actual clip region. Must be specified before StartDrawing.
Read/write property DisplayTransformation The transformation used by the display.
Method DrawMultipoint Draws specified multipoint on the display.
Method DrawPoint Draws specified point on the display.
Method DrawPolygon Draws specified polygon on the display.
Method DrawPolyline Draws specified line on the display.
Method DrawRectangle Draws specified rectangle on the display.
Method DrawText Draws specified text on the display.
Read/write property Filter Display filter. Must call while in a StartDrawing-FinishDrawing sequence. Set Filter to 0 to resume normal drawing.
Method FinishDrawing Completes drawing.
Read-only property hDC The device context that the display is currently drawing to. Only valid between calls to StartDrawing and FinishDrawing.
Read/write property hPalette Palette.
Read/write property IlluminationProps Illumination properties used by the display.
Method Progress Call frequently during drawing process.
Method SetSymbol Sets the symbol used for drawing. Four different symbols can be specified simultaneously: Marker, Line, Fill, Text.
Method StartDrawing Prepare the display for drawing. Specify the device context and the cache to draw to (normally esriNoScreenCache). The ScreenDisplay coclass will automatically create a window device context if you specify hdc = 0.
Read/write property SuppressEvents Indicates if display object suppresses events.

CoClasses that implement IDisplay

CoClasses and Classes Description
AppDisplay (esriArcMapUI) Esri Display.
GlobeDisplay (esriGlobeCore) The globe display object.
SceneGraph (esri3DAnalyst) A container for recording data and events that occur in a scene.
ScreenDisplay Display class for drawing to window.
SimpleDisplay Display class for drawing to any HDC.

Remarks

The Display objects, those that implement IDisplay, are a set of objects which allow application developers to easily draw graphics on a variety of output devices.  These objects allow you to render shapes stored in real-world coordinates to a screen, printer, or export file.

The IDisplay interface abstracts a drawing surface.  A drawing surface is simply any hardware device, export file, or memory bitmap that can be represented by a Windows Device Context.   Each display manages its own DisplayTransformation object which handles the conversion of coordinates from real-world space to device space and back. 

There are currently two Display objects: ScreenDisplay and SimpleDisplay.  The ScreenDisplay object abstracts a normal application window and implements scrolling and backing store.  The SimpleDisplay abstracts all other devices that can be rendered to using a Windows Device Context such as printers and metafiles.

.NET Snippets

Create Tactical Graphic | Add Event Wiring for All IActiveViewEvents | Export MOLE Cached Graphic To Bitmap | Export MOLE Cached Graphic To File | Move Force Element | Create Marker Symbol From MOLE Cached Graphic | Do Identify | Flash Geometry

.NET Samples

Dynamic logo (Code Files: DynamicLogo) | Dynamic display animated zoom (Code Files: AnimatedZoomInTool AnimatedZoomOutTool) | Dynamic biking (Code Files: DynamicBikingCmd) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Dynamic display—tracking dynamic object (Code Files: TrackObject) | Edit event listener (Code Files: EventListener) | Move a graphic along a path in ArcMap (Code Files: MapGraphicKeyframe) | RSS weather layer (Code Files: RSSWeatherLayerClass) | Multivariate renderer (Code Files: MultivariateRenderer) | Triangle graphic element (Code Files: TriangleElementClass)

.NET Related Topics

Best practices for using dynamic display | Getting started with dynamic display | How to plug in dynamic drawing | How to wire custom events using IActiveViewEvents