This interface expose APIs to change graphics settings of a drawable class.
More...
This interface expose APIs to change graphics settings of a drawable class.
All other LPV classes that provides draw functionalities implements this interface. You may cast a drawable LPV object into ILDrawable interface, and then change its pen, brush or font properties.
The following lists all the drawable LPV classes:
LPVCoreLib | LRectRegion, LRotRectRegion, LCircleRegion, LPolyRegion, LMaskRegion, LAnnulusRegion, LEllipseRegion, LAnnulusSectorRegion LCompoundRegion |
LPVGeomLib | LPoint, LPoints, LCircle, LLine, LPolygon, LRect, LEllipse, LArc |
LPVGeomXLib | LSortedArray |
LPVPatLib | LMatchResult, LMatchResults |
LPVCalibLib | LCalibPointPairs |
LPVImgProcLib | LHistogram |
LPVBlobLib | LBlob, LBlobResults |
LPVLocateLib | LLineResult, LLineResults, LCircleResult, LCircleResults |
LPVLocateXLib | LPathResult, LPathResults, LContourResult, LContourResults |
LPVGaugeLib | LShapeGaugeResult |
LPVMathLib | LDataList |
LPVBarcodeLib | LBarcodeResult, LBarcodeResults |
LPVOCRLib | LOCRChar, LOCRLine, LOCRResult |
Example Code
C++
ILDrawable::Cast(drawable)->SetPenWidth(2);
ILDrawable::Cast(drawable)->SetPen(LPVPenStyle::LPVPenSolid, 1, LPVColor::LPVYellow);
C#
((ILDrawable)roi).SetPenWidth(2);
LPVColor
This enumeration represents the commonly used colors.
Definition: LPVCore.idl:1544
LPVPenStyle
This enumeration represents the pen style used to draw the path.
Definition: LPVCore.idl:1035
COM
((ILDrawablePtr)drawable)->SetPenWidth(2);
((ILDrawablePtr)drawable)->SetPen(LPVPenStyle::LPVPenSolid, 1, LPVColor::LPVYellow);
Note: This interface is currently not available on Linux / MacOS platform.
◆ SetBrushColor()
void SetBrushColor |
( |
COLORREF |
brushColor | ) |
|
Set the brush color used for fill an object path.
- Parameters
-
◆ SetDrawName()
void SetDrawName |
( |
BOOL |
val | ) |
|
Set whether to draw the object's name on canvas.
- See also
- SetFont()
- Since
- 2.12.0
◆ SetDrawPoint()
Set the draw setting for points drawn on canvas for current object
- Parameters
-
[in] | size | Set the radius of point, by default it's 5 pixels. Set to -1 to fall back to use global setting. |
[in] | shapeSet | the shape of point, by default it's a crosshair shape. |
- Since
- 2.12.0
◆ SetFont()
void SetFont |
( |
LString |
fontFamily, |
|
|
int |
fontHeight, |
|
|
COLORREF |
fontColor, |
|
|
BOOL |
bold, |
|
|
BOOL |
italic, |
|
|
BOOL |
underline, |
|
|
BOOL |
strikeOut |
|
) |
| |
Set font for drawing text. If not defined, we use the default system proportional font, MS Sans Serif is typically used.
- Parameters
-
[in] | fontFamily | The typeface name of the font, say, "Arial", "Tahoma", "Sans-Serif", etc. |
[in] | fontHeight | The height, in logical units, of the font's character cell or character. |
[in] | fontColor | color of the text, see also ILSystem::GetColorRef |
[in] | bold | Bold text |
[in] | italic | Italic text |
[in] | underline | Under-line text |
[in] | strikeOut | Strike-through text |
- See also
- SetFontFamily(), SetFontHeight(), SetFontColor()
◆ SetFontColor()
void SetFontColor |
( |
COLORREF |
fontColor | ) |
|
Set the text color, other properties of the font is not changed.
- See also
- SetFont()
◆ SetFontFamily()
void SetFontFamily |
( |
LString |
fontFamily | ) |
|
Set the font family, other properties of the font is not changed.
- See also
- SetFont()
◆ SetFontHeight()
void SetFontHeight |
( |
int |
fontHeight | ) |
|
Set the font height, other properties of the font is not changed.
- See also
- SetFont()
◆ SetPen()
void SetPen |
( |
LPVPenStyle |
penStyle, |
|
|
int |
penWidth, |
|
|
COLORREF |
penColor |
|
) |
| |
Set the pen used for drawing an object path. If not defined, we use a green solid pen of 1 pixel width.
- Parameters
-
[in] | penStyle | Style of the pen |
[in] | penWidth | width of the pen, it should be at least 1 pixel width. The max supported width is 31. |
[in] | penColor | color of the pen, see also ILSystem::GetColorRef |
- See also
- SetPenColor(), SetPenWidth(), SetPenStyle()
◆ SetPenColor()
void SetPenColor |
( |
COLORREF |
penColor | ) |
|
Set the pen color used for drawing an object path, other properties of the pen is not changed.
- See also
- SetPen().
◆ SetPenStyle()
Set the pen style used for drawing an object path, other properties of the pen is not changed.
- See also
- SetPen().
◆ SetPenWidth()
void SetPenWidth |
( |
int |
penWidth | ) |
|
Set the pen width used for drawing an object path, other properties of the pen is not changed.
- See also
- SetPen().