This document is archived and information here might be outdated.  Recommended version.


IFeatureRenderer.Draw Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IFeatureRenderer.Draw Method

Draws features from the specified cursor on the given display.

[Visual Basic .NET]
Public Sub Draw ( _
    ByVal Cursor As IFeatureCursor, _
    ByVal DrawPhase As esriDrawPhase, _
    ByVal Display As IDisplay, _
    ByVal TrackCancel As ITrackCancel _
)
[C#]
public void Draw (
    IFeatureCursor Cursor,
    esriDrawPhase DrawPhase,
    IDisplay Display,
    ITrackCancel TrackCancel
);
[C++]
HRESULT Draw(
  IFeatureCursor* Cursor,
  esriDrawPhase DrawPhase,
  IDisplay* Display,
  ITrackCancel* TrackCancel
);
[C++]

Parameters Cursor [in]
Cursor is a parameter of type IFeatureCursor DrawPhase [in]
DrawPhase is a parameter of type esriDrawPhase Display [in]
Display is a parameter of type IDisplay TrackCancel [in]
TrackCancel is a parameter of type ITrackCancel

Product Availability

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

Remarks

This method is typically called by the framework to renderer features to a display. This could be in response to a refresh on the map. This method typically iterates through all the features and renders each feature with an appropriate symbol.

An individual feature is typically drawn by calling the Draw method on the feature's IFeatureDraw with the symbol created by the renderer. However, when writing a custom feature renderer you can draw anything you want using a number of different methods. To learn more see the section on writing a custom feature renderer in Extending ArcObjects.

To allow complex rendering to be canceled halfway through a draw, the renderer typically checks the TrackCancel object after each feature or set of features. If a cancel action has occurred, the renderer will exit.

There are three drawing phases: selection, annotation, and geography, and this method can be called by the framework up to three times. With the exception of the selection phase, this method will only be called for a particular draw phase if the call by the framework to RenderPhase returns true for that phase.

Feature renderers typically only draw features during the geography phase, though in some cases features are drawn in the annotation phase. Take for example a case where proportional symbols are drawn for polygon features. The ProportionalSymbolRenderer draws the background fill symbol during the geography phase and the proportionally sized marker symbol during the annotation phase.

See Also

IFeatureRenderer Interface