Table of Contents

DisplayImage2

from OpenCAD2D import DisplayImage2

class DisplayImage2(DisplayItem2) ยท DisplayImage2 in the .NET reference

The picture of an IMAGE: the file it shows laid on the parallelogram of its corner and its two sides, clipped by its boundary. A picture of 40 by 30 pixels placed at (10, 20) with a pixel 0.25 across is the parallelogram from (10, 20) along (10, 0) and (0, 7.5). It is never picked by a point: the frame drawn as its own item is, as AutoCAD picks an image by its frame; a window or a crossing takes it by its box.

Constructors

__init__

.NET

def __init__(
    self,
    x: float,
    y: float,
    ux: float,
    uy: float,
    vx: float,
    vy: float,
    clip: System.Collections.Generic.IReadOnlyList[Sequence[float] | System.Array[float]],
    clipInverted: bool,
    filePath: str,
    fileName: str,
    style: DisplayStyle,
    handle: str,
    layer: str,
) -> None

Makes the picture of an image.

Properties and fields

Bounds

.NET

@property
def Bounds(self) -> DisplayBox

Gets the box that holds the item.

Brightness

.NET

@property
def Brightness(self) -> int

Gets the brightness of the picture, 0 to 100, 50 as it is.

Clip

.NET

@property
def Clip(self) -> System.Collections.Generic.IReadOnlyList[System.Array[float]] | None

Gets the rings the picture is clipped by, each as X and Y in turn; null where it shows the whole picture.

Contrast

.NET

@property
def Contrast(self) -> int

Gets the contrast of the picture, 0 to 100, 50 as it is.

Fade

.NET

@property
def Fade(self) -> int

Gets how far the picture is faded into the background, 0 to 100, 0 not at all.

FileName

.NET

@property
def FileName(self) -> str

Gets the path the drawing names the picture by.

FilePath

.NET

@property
def FilePath(self) -> str | None

Gets the full path of the picture file found; null where none was found or the picture is unloaded.

FileStamp

.NET

@property
def FileStamp(self) -> int

Gets the time the picture file was last written, in ticks, when the item was made, so that a picture changed on disk is read again; nought for none.

IsBitonal

.NET

@property
def IsBitonal(self) -> bool

Gets whether the picture is bitonal, one bit a pixel as a scanned drawing is: its dark pixels are then drawn in the colour of the image object and its light ones are the background, which transparency lets what is under it show.

IsClipInverted

.NET

@property
def IsClipInverted(self) -> bool

Gets whether the picture shows what lies outside its rings rather than inside.

IsDraft

.NET

@property
def IsDraft(self) -> bool

Gets whether the picture is drawn with the quality Draft, each pixel a square, rather than High, the pixels blended where the picture is scaled (the drawing's IMAGEQUALITY).

IsMonochrome

.NET

@property
def IsMonochrome(self) -> bool

Gets whether a plot draws the picture in black and white, as the plot quality Monochrome of an OLE frame says.

IsPickedInside

.NET

@property
def IsPickedInside(self) -> bool

Gets whether a point on the picture picks it, as it does for an OLE frame; an IMAGE is picked by its frame alone.

IsTransparent

.NET

@property
def IsTransparent(self) -> bool

Gets whether the picture's transparent pixels let what is under it show (the IMAGE's transparency on).

Picture

.NET

@property
def Picture(self) -> System.Array[int] | None

Gets the bytes of the bitmap file the picture of an OLE frame is, which the renderer decodes in place of a file; null for the picture of an IMAGE, which is read from DisplayImage2.FilePath.

PictureKey

.NET

@property
def PictureKey(self) -> str

Gets what tells the bytes of DisplayImage2.Picture from any others, so that a picture is decoded once however many drawings hold it.

Ux

.NET

@property
def Ux(self) -> float

Gets the X of the side along the picture's width.

Uy

.NET

@property
def Uy(self) -> float

Gets the Y of the side along the picture's width.

Vx

.NET

@property
def Vx(self) -> float

Gets the X of the side up the picture's height.

Vy

.NET

@property
def Vy(self) -> float

Gets the Y of the side up the picture's height.

X

.NET

@property
def X(self) -> float

Gets the X of the corner the picture's lower left pixel sits at.

Y

.NET

@property
def Y(self) -> float

Gets the Y of that corner.

Methods

DistanceTo

.NET

def DistanceTo(self, x: float, y: float) -> float

Gets the distance from a point to the picture: infinite for an IMAGE, which is picked by its frame, never by a point on it; for an OLE frame, nought on the picture and infinite off it.