Leaper WaferScan Toolkit
中文 / English 2.x
Public Member Functions
ILSystem Interface Reference

This interface provide miscellaneous functions to change LPV system configurations globally. More...

Inheritance diagram for ILSystem:
LSystem

Public Member Functions

BOOL CheckLib (LString libName)
 
BOOL CheckLicense ()
 
BOOL CheckVersion (long majorVersion, long minorVersion, long microVersion)
 
void DrawCircle (double x, double y, double r, BOOL bFill, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void DrawLine (double x1, double y1, double x2, double y2, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void DrawPoint (double x, double y, LPVPointShape shape, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void DrawPolygon (LArray< double > xs, LArray< double > ys, BOOL bClosed, BOOL bFill, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void DrawRect (double x, double y, double w, double h, double a, BOOL bFill, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void DrawString (LString text, int tlx, int tly, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
COLORREF GetColorRef (int red, int green, int blue)
 
void GetRGBFromColorRef (COLORREF colorRef, int *red, int *green, int *blue)
 
LPVErrorCode RefreshDefaults (LString filename)
 
void SetDefault (LString settingName, LString val)
 
void SetDrawPointSize (int size)
 
void SetRegionHandleSize (int size)
 

Detailed Description

This interface provide miscellaneous functions to change LPV system configurations globally.

To use this interface, you should create a LSystem object.

Example Code

Member Function Documentation

◆ CheckLib()

BOOL CheckLib ( LString  libName)

Check whether the library is licensed then you can use the algorithms in that library.
You may call it as:

Parameters
[in]libNamePass in the name of the library. The name is case-insensitive, and the "lpv" prefix can be omitted, say "lpvCore.dll", "lpvCore", "core", "CORE".
Return values
valTrue for valid license, otherwise, return False.

◆ CheckLicense()

BOOL CheckLicense ( )

Check any valid license is available. Note: we won't exam the feature IDs here, you should call CheckLib() instead.
You may call it as:

Return values
valTrue for valid license, otherwise, return False.

◆ CheckVersion()

BOOL CheckVersion ( long  majorVersion,
long  minorVersion,
long  microVersion 
)

Check the compatibility of the running and the compiled version of the LPW toolkit. You may call it as:

For failed check, you may re-install the correct version. It's recommended to use the same version for compiling and running.

Parameters
[in]majorVersionThe major version in compiling.
[in]minorVersionThe minor version in compiling.
[in]microVersionThe micro version in compiling.
Return values
valTrue for valid compatibility, otherwise, return False.

◆ DrawCircle()

void DrawCircle ( double  x,
double  y,
double  r,
BOOL  bFill,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a circle on HDC. Current pen and brush of the system object is used.

Parameters
[in]xThe x-coordinate of the input circle's center point.
[in]yThe y-coordinate of the input circle's center point.
[in]rThe radius of the input circle.
[in]bFillWhether to fill the circle using current brush.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawLine()

void DrawLine ( double  x1,
double  y1,
double  x2,
double  y2,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a line on HDC. Current pen of the system object is used.

Parameters
[in]x1The x-coordinate of the input line's start point.
[in]y1The y-coordinate of the input line's start point.
[in]x2The x-coordinate of the input line's end point.
[in]y2The y-coordinate of the input line's end point.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawPoint()

void DrawPoint ( double  x,
double  y,
LPVPointShape  shape,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a point on HDC. Current pen of the system object is used.

Parameters
[in]xThe x-coordinate of the input point.
[in]yThe y-coordinate of the input point.
[in]shapeThe drawn shape of the point.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawPolygon()

void DrawPolygon ( LArray< double >  xs,
LArray< double >  ys,
BOOL  bClosed,
BOOL  bFill,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a polygon on HDC.

Parameters
[in]xsThe x-coordinates of the input polygon vertexes.
[in]ysThe y-coordinates of the input polygon vertexes.
[in]bClosedWhether this is a closed polygon.
[in]bFillWhether to fill the circle using current brush.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawRect()

void DrawRect ( double  x,
double  y,
double  w,
double  h,
double  a,
BOOL  bFill,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a rectangle on HDC.

Parameters
[in]xThe x-coordinate of the input rectangle's center point.
[in]yThe y-coordinate of the input rectangle's center point.
[in]wThe width of the input rectangle.
[in]hThe height of the input rectangle.
[in]aThe angle of the input rectangle.
[in]bFillWhether to fill the circle using current brush.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawString()

void DrawString ( LString  text,
int  tlx,
int  tly,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw a text string on HDC.

Parameters
[in]textThe input text string.
[in]tlxThe x-coordinate of the top-left corner of the text region.
[in]tlyThe y-coordinate of the top-left corner of the text region.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ GetColorRef()

COLORREF GetColorRef ( int  red,
int  green,
int  blue 
)

Convert RGB(red, green, blue) value to a 32-bit value representing the same color, in RRGGBB format. Alternatively, you could use ColorTranslator.ToWin32() for C# or RGB() macro in GDI for C++.

See also
GetRGBFromColorRef()

◆ GetRGBFromColorRef()

void GetRGBFromColorRef ( COLORREF  colorRef,
int *  red,
int *  green,
int *  blue 
)

Get RGB(red, green, blue) values from a 32-bit value representing the same color. The 32-bit value is in RRGGBB format. Alternatively, you could use ColorTranslator.FromWin32() for C# or GetRValue()/GetGValue()/GetBValue() macro in GDI for C++.

Parameters
[in]colorRefThe input color value
[out]redOutput the red value
[out]greenOutput the green value
[out]blueOutput the blue value
See also
GetColorRef()

◆ RefreshDefaults()

LPVErrorCode RefreshDefaults ( LString  filename)

Refresh system default settings from the given .default file, which is a yml file as following:

%YAML:1.0
defaultLogLevel: 0
silent: true
Parameters
[in]filenameFull path of the file, it could be absolute or relative path with file name and extension.
Return values
errorReturn error code if anything is wrong.
Since
2.1.0

◆ SetDefault()

void SetDefault ( LString  settingName,
LString  val 
)

Change system default setting. The supported settings are listed in the following table:

Setting Usage Default Value
pointSize Radius of point drawn on canvas (pixel) 5
roiHandleSize Region handles' size on canvas (pixel) 7
paragraphSpace Paragraph space for text drawn on canvas (pixel) 6
doublePrecision Double precision used in drawing a chart on canvas (pixel) 3
defaultLogLevel Log level
(0 Trace, 10000 Debug, 20000 Info, 30000 Warn, 40000 Error, 50000 Fatal, 60000 Off)
30000 (Warn)
noLicenseRetryMsgBox Whether to stop showing up the licensing failure dialog for user to retry false (pop up)
silent Whether to stop showing up any message box false (pop up)
genCrashDump Whether to generate the core dump file when crash false (no)
useFullDump Whether to generate the full core dump file false (no)

You may call it as:

Parameters
[in]settingNameThe default setting name.
[in]valThe new setting value.
Since
2.1.0

◆ SetDrawPointSize()

void SetDrawPointSize ( int  size)

Change the radius of point drawn on canvas globally, by default it's 5 pixels.

◆ SetRegionHandleSize()

void SetRegionHandleSize ( int  size)

Change the size of region handles(and its interactable area) drawn on canvas globally, by default it's 7 pixels.

Parameters
[in]sizeThe required handle size in pixel.