CadRenderLabels
from OpenCAD2D import CadRenderLabels
class CadRenderLabels(System.Object) ยท CadRenderLabels in the .NET reference
The labels of a picture CadRender.DrawLabels made: for each pixel the class of what is drawn on it and the entity that draws it, exactly, with no antialiasing, as two arrays the size of the picture; the matrix from the drawing to the pixels; and for each entity its box in pixels, the pixels it holds and the frames of its words. A picture of 1 600 by 1 200 pixels holds 1 920 000 classes (bytes) and as many instance numbers (4 bytes each).
Properties and fields
Areas
@property
def Areas(self) -> System.Array[int]
Gets the number of pixels each entity of CadRenderLabels.Handles holds in CadRenderLabels.Instances.
Boxes
@property
def Boxes(self) -> System.Array[float]
Gets the box in pixels of each entity of CadRenderLabels.Handles that holds a pixel, four numbers each (the least x, the least y, the greatest x and the greatest y, whole numbers, y down from the top of the picture): the box the drawing gives it (CadSpatial) through the matrix, widened to hold every pixel of the entity, and clipped to the picture. All four are 0 for an entity with no pixel.
Categories
@property
def Categories(self) -> System.Array[int]
Gets the category of each entity of CadRenderLabels.Handles, a CadLabelClass by its kind: words for a TEXT, an MTEXT, an ATTRIB or an ATTDEF; dimensions for a DIMENSION; hatches for a HATCH, a SOLID, a TRACE or a WIPEOUT (whose frame is all of it that has pixels: its fill blanks); blocks for an INSERT; lines for the rest.
Classes
@property
def Classes(self) -> System.Array[int]
Gets the class of each pixel, CadRenderLabels.Height rows of CadRenderLabels.Width pixels from the top: a CadLabelClass, 0 where nothing is drawn or where the class was not asked for.
FrameCorners
@property
def FrameCorners(self) -> System.Array[float]
Gets the frames of the words of the space, eight numbers each: the four corners (x then y), counter-clockwise from the foot of the start, in pixels, turned as the text is: a text 20 long and 2.5 high turned 30 degrees is the four corners of that rectangle on the picture, not the corners of the box round it. A frame is not clipped to the picture.
FrameInstances
@property
def FrameInstances(self) -> System.Array[int]
Gets, for each frame of a word in CadRenderLabels.FrameCorners, the number of the instance whose word it is, from 1.
Handles
@property
def Handles(self) -> System.Array[str]
Gets the handles the instance numbers stand for: the entities of the space in the order its display list first draws them, those that draw nothing included, then the entities of model space a viewport shows, in the order of the viewports. An entity keeps its number as long as the drawing is not changed.
Height
@property
def Height(self) -> int
Gets the height of the picture in pixels.
Instances
@property
def Instances(self) -> System.Array[int]
Gets the instance of each pixel in the order of CadRenderLabels.Classes: 0 where nothing is drawn, else k, the entity Handles[k - 1] that draws the pixel.
Transform
@property
def Transform(self) -> System.Array[float]
Gets the matrix CadRender.Transform gives for the same options: nine numbers, a 3 by 3 row by row, from a point of the drawing to its place in the picture in pixels.
Width
@property
def Width(self) -> int
Gets the width of the picture in pixels.