Table of Contents

CadRenderOptions

from OpenCAD2D import CadRenderOptions

class CadRenderOptions(System.Object) ยท CadRenderOptions in the .NET reference

How CadRender draws a space with no window: which space, what part of it, how large and on what ground. Every property has a default that gives the picture of ZOOM Extents on a canvas of 1 600 pixels along its longer side, on the canvas's black.

Constructors

__init__

def __init__(self) -> None

Properties and fields

Background

.NET

@property
def Background(self) -> int
@Background.setter
def Background(self, value: int) -> None

Gets or sets the colour of model space's ground as 0xRRGGBB: 0, the default, is the black of the canvas; 0xFFFFFF is white, on which the colour 7 is drawn black. The paper of a layout is white whatever this is.

Box

.NET

@property
def Box(self) -> DisplayBox
@Box.setter
def Box(self, value: DisplayBox) -> None

Gets or sets the part of the space drawn, in its own units (model units, or millimetres of paper on a layout), fitted to the picture with no margin and centred; empty, the default, for the extents of the space with the 5 per cent margin ZOOM Extents leaves, a layout's sheet of paper among them.

Dpi

.NET

@property
def Dpi(self) -> float
@Dpi.setter
def Dpi(self, value: float) -> None

Gets or sets the pixels to an inch of paper, 96 by default, for a layout drawn at no size of its own: a sheet of A3, 420 by 297 mm, is 1 587 by 1 123 pixels at 96 and 4 961 by 3 508 at 300 (a layout whose paper units are inches, 16.54 by 11.69, the same). It has no effect in model space, nor where CadRenderOptions.Width or CadRenderOptions.Height is given; the widths of lines stay the canvas's, in pixels.

Height

.NET

@property
def Height(self) -> int
@Height.setter
def Height(self, value: int) -> None

Gets or sets the height of the picture in pixels. Nought, the default, takes it from CadRenderOptions.Width where that is given, and else as CadRenderOptions.Width does.

Layout

.NET

@property
def Layout(self) -> str | None
@Layout.setter
def Layout(self, value: str | None) -> None

Gets or sets the layout drawn: its name as its tab shows it, letters of either case the same, or "Model" for model space; null, the default, for the space the drawing was left in.

Width

.NET

@property
def Width(self) -> int
@Width.setter
def Width(self, value: int) -> None

Gets or sets the width of the picture in pixels. Nought, the default, takes it from CadRenderOptions.Height where that is given, and else from CadRenderOptions.Dpi on a layout or 1 600 pixels along the longer side in model space.