Table of Contents

CadImageJob

from OpenCAD2D import CadImageJob

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

An image PNGOUT, JPGOUT or BMPOUT hands to the window (CadUiRequestEventArgs.Image): the space and the view the drawing area shows, the file, and the objects selected. The window first fills CadImageJob.FileName from its Create Raster File dialog; then it draws the view at the drawing area's size, as it is shown but with no cursor, grips or highlight, and writes the file. A view of 1 200 by 800 pixels gives an image of 1 200 by 800.

Constructors

__init__

.NET

def __init__(self, format: CadImageFormat, space: CadSpace, view: CadView) -> None

Makes an image to hand to the window.

Properties and fields

Extension

.NET

@property
def Extension(self) -> str

Gets the extension of the file, with its dot: .png, .jpg or .bmp.

FileName

.NET

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

Gets or sets the file to write. The command sets the one it offers before asking the window, which sets the one its dialog chose, or null where it was cancelled.

Format

.NET

@property
def Format(self) -> CadImageFormat

Gets the kind of file.

Handles

.NET

@property
def Handles(self) -> System.Collections.Generic.IReadOnlyList[str] | None

Gets the handles of the objects selected, in ordinal order; null for all objects and viewports.

PixelHeight

.NET

@property
def PixelHeight(self) -> int

Gets the height of the image in pixels: the view's, at least 1.

PixelWidth

.NET

@property
def PixelWidth(self) -> int

Gets the width of the image in pixels: the view's, at least 1.

Space

.NET

@property
def Space(self) -> CadSpace

Gets the space shown.

View

.NET

@property
def View(self) -> CadView

Gets the view of the drawing area; with no window, one of 1 920 by 1 080 pixels showing the space's extents.