Table of Contents

Method Draw

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Rendering.dll

Draw(CadDocument, CadRenderOptions)

Draws a space of a drawing and gives its pixels, as the canvas of the app draws it: nothing selected, the drawing's lineweights shown where its $LWDISPLAY says so, and images read before the picture is drawn. A drawing whose extents are 400 by 300 mm is a picture of 1 600 by 1 200 pixels, 5 760 000 bytes.

public static CadRenderImage Draw(CadDocument document, CadRenderOptions options)

Parameters

document CadDocument

The drawing.

options CadRenderOptions

The space, the part, the size and the ground; null for the defaults.

Returns

CadRenderImage

The picture.

Exceptions

ArgumentNullException

Thrown when the document is null.

ArgumentException

Thrown when the layout is not in the drawing, a size is negative, the Dpi is not above nought, the ground is not a colour of 0 to 0xFFFFFF, or the picture is over 16 384 pixels a side or 100 000 000 pixels in all.