Table of Contents

Method WritePng

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Rendering.dll

WritePng(string, CadDocument, CadRenderOptions)

Draws a space of a drawing to a PNG file, replacing a file of the name: the picture of Draw(CadDocument, CadRenderOptions) as 8-bit red, green and blue with no alpha, as PNGOUT writes it.

public static void WritePng(string path, CadDocument document, CadRenderOptions options)

Parameters

path string

The file.

document CadDocument

The drawing.

options CadRenderOptions

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

Exceptions

ArgumentNullException

Thrown when the path or the document is null.

ArgumentException

Thrown for the options Draw(CadDocument, CadRenderOptions) refuses.

IOException

Thrown when the file cannot be written.