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__
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
@property
def Bounds(self) -> DisplayBox
Gets the box that holds the item.
Brightness
@property
def Brightness(self) -> int
Gets the brightness of the picture, 0 to 100, 50 as it is.
Clip
@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
@property
def Contrast(self) -> int
Gets the contrast of the picture, 0 to 100, 50 as it is.
Fade
@property
def Fade(self) -> int
Gets how far the picture is faded into the background, 0 to 100, 0 not at all.
FileName
@property
def FileName(self) -> str
Gets the path the drawing names the picture by.
FilePath
@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
@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
@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
@property
def IsClipInverted(self) -> bool
Gets whether the picture shows what lies outside its rings rather than inside.
IsDraft
@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
@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
@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
@property
def IsTransparent(self) -> bool
Gets whether the picture's transparent pixels let what is under it show (the IMAGE's transparency on).
Picture
@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
@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
@property
def Ux(self) -> float
Gets the X of the side along the picture's width.
Uy
@property
def Uy(self) -> float
Gets the Y of the side along the picture's width.
Vx
@property
def Vx(self) -> float
Gets the X of the side up the picture's height.
Vy
@property
def Vy(self) -> float
Gets the Y of the side up the picture's height.
X
@property
def X(self) -> float
Gets the X of the corner the picture's lower left pixel sits at.
Y
@property
def Y(self) -> float
Gets the Y of that corner.
Methods
DistanceTo
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.