Class CadLabelClass
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Rendering.dll
The classes DrawLabels(CadDocument, CadRenderOptions, int[]) sorts what a picture shows into: a number from 1 to 5 for each pixel that holds something, 0 for the ground. The numbers are fixed and are the category ids of a COCO file made from the same picture.
public static class CadLabelClass
- Inheritance
-
CadLabelClass
- Inherited Members
Remarks
A pixel takes the class of the item drawn on top of it, in the order the drawing draws them. An item is a word where it is a piece of text (the letters of a TEXT, an MTEXT, an attribute, a dimension's text, a leader's) or belongs to a TEXT, an MTEXT, an ATTRIB or an ATTDEF (an MTEXT's underline); it is a dimension where it belongs to a DIMENSION and is not text (its lines and arrowheads); it is a hatch where it belongs to a HATCH, a SOLID or a TRACE (its pattern lines and its fill) or is the frame of a WIPEOUT (its fill blanks what is under it, as it does in the picture, and is the ground, class 0); a block where Blocks is asked for and it belongs to an INSERT; and a line otherwise (lines, arcs, circles, polylines, splines, ellipses, leaders and table lines).
Fields
- Background
The class of a pixel nothing is drawn on: 0.
- Blocks
The class of an INSERT's whole drawing, where blocks are asked for: 5.
- Count
The most classes, ground included: the number after the last class.
- Dimensions
The class of the lines and arrowheads of a dimension: 2.
- Hatches
The class of hatches, solids and traces, and of the frame of a wipeout: 4.
- Lines
The class of lines, arcs, circles, polylines, splines and everything else that is drawn as a curve: 3.
- Words
The class of text: 1.
Methods
- NameOf(int)
Gets the name of a class: the ground is "background", then "words", "dimensions", "lines", "hatches" and "blocks", the names of the categories of a COCO file.