Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions
ILDrawable Interface Reference

This interface expose APIs to change graphics settings of a drawable class. More...

Inheritance diagram for ILDrawable:
LBarcodeResult LBarcodeResults LBlob LBlobResults LCalibPointPairs LAnnulusRegion LAnnulusSectorRegion LCircleRegion LCompoundRegion LEllipseRegion LMaskRegion LPolyRegion LRectRegion LRotRectRegion LText LEdgeGaugeResult LEdgeGaugeResult LShapeGaugeResult LShapeGaugeResult LArc LCircle LEllipse LLine LPoint LPoints LPolygon LRect LTransform LSortedArray LHistogram LCircleResult LCircleResults LLineResult LLineResults LContourResult LContourResults LCrossMarkResult LCrossMarkResults LPathResult LPathResults LDataList LOCRChar LOCRLine LOCRResult LMatchResult LMatchResults

Public Member Functions

void SetBrushColor (COLORREF brushColor)
 
void SetFont (LString fontFamily, int fontHeight, COLORREF fontColor, BOOL bold, BOOL italic, BOOL underline, BOOL strikeOut)
 
void SetFontColor (COLORREF fontColor)
 
void SetFontFamily (LString fontFamily)
 
void SetFontHeight (int fontHeight)
 
void SetPen (LPVPenStyle penStyle, int penWidth, COLORREF penColor)
 
void SetPenColor (COLORREF penColor)
 
void SetPenStyle (LPVPenStyle penStyle)
 
void SetPenWidth (int penWidth)
 

Detailed Description

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:

LPVCoreLibLRectRegion, LRotRectRegion, LCircleRegion, LPolyRegion, LMaskRegion, LAnnulusRegion, LEllipseRegion, LAnnulusSectorRegion LCompoundRegion
LPVGeomLibLPoint, LPoints, LCircle, LLine, LPolygon, LRect, LEllipse, LArc
LPVGeomXLibLSortedArray
LPVPatLibLMatchResult, LMatchResults
LPVCalibLibLCalibPointPairs
LPVImgProcLibLHistogram
LPVBlobLibLBlob, LBlobResults
LPVLocateLibLLineResult, LLineResults, LCircleResult, LCircleResults
LPVLocateXLibLPathResult, LPathResults, LContourResult, LContourResults
LPVGaugeLibLShapeGaugeResult
LPVMathLibLDataList
LPVBarcodeLibLBarcodeResult, LBarcodeResults
LPVOCRLibLOCRChar, LOCRLine, LOCRResult

Example Code

Note: This interface is currently not available on Linux / MacOS platform.

Member Function Documentation

◆ SetBrushColor()

void SetBrushColor ( COLORREF  brushColor)

Set the brush color used for fill an object path.

Parameters
[in]brushColorcolor of the brush, see also ILSystem::GetColorRef

◆ 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]fontFamilyThe typeface name of the font, say, "Arial", "Tahoma", "Sans-Serif", etc.
[in]fontHeightThe height, in logical units, of the font's character cell or character.
[in]fontColorcolor of the text, see also ILSystem::GetColorRef
[in]boldBold text
[in]italicItalic text
[in]underlineUnder-line text
[in]strikeOutStrike-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]penStyleStyle of the pen
[in]penWidthwidth of the pen, it should be at least 1 pixel width. The max supported width is 31.
[in]penColorcolor 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()

void SetPenStyle ( LPVPenStyle  penStyle)

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().