DrawContext
A class that provides drawing functionality for use by IDirectContext3DServer servers
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.DirectContext3D.DrawContext
Namespace: Autodesk.Revit.DB.DirectContext3D
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static class DrawContext
The DrawContext type exposes the following members.
Methods
Name
Description
Public Method
Static Member
FlushBuffer
Submits geometry for rendering.
Public Method
Static Member
GetCamera
Gets the camera corresponding to the Revit view where rendering takes place.
Public Method
Static Member
GetClipPlanes
Gets the clipping planes for the Revit view where rendering takes place. Clipping planes control the 3D extent of a view and can be set using Section Box in Revit.
Public Method
Static Member
GetClipRectangle
Gets the clip rectangle for the Revit view where rendering takes place. The clip rectangle is the area currently being redrawn, which may be smaller than the view rectangle.
Public Method
Static Member
GetOverrideColor
Returns override color that will be applied to geometry during rendering.
Public Method
Static Member
GetOverrideTransparency
Returns override transparency that will be applied to geometry during rendering.
Public Method
Static Member
GetViewRectangle
Gets the rectangle that represents the extent (in 2D) of the Revit view where rendering takes place.
Public Method
Static Member
IsAvailable
Checks whether the facilities of this class are available for use in the current scope.
Public Method
Static Member
IsInterrupted
Checks whether the current rendering pass has been interrupted.
Public Method
Static Member
IsTransparentPass
Determines whether the current rendering pass is for transparent objects.
Public Method
Static Member
SetWorldTransform
Sets the world transformation that will be applied to geometry during rendering.
Remarks
The drawing facility of this class is conceptually similar to a low-level graphics API. The functionality operates on a set of geometry primitives such as triangles, lines, and points, which are encoded into a set of vertex and index buffers.
Aside from submission of geometry in buffers, a major part of the drawing process is responding to certain changes in graphics state. For example, users of this class can implement progressive rendering of geometry by testing whether there have been interruptions that should prevent the drawing from being completed.