ImageWindow::DrawBox
Draws a rectangle in the Image Display window
int DrawBox(
int x0,
int y0,
int x1,
int y1
);
int DrawBox(
int x0,
int y0,
int x1,
int y1,
COLORREF fillColor
);
int DrawBox(
double x0,
double y0,
double x1,
double y1,
ProcUnit *ptrProcUnit,
int imageNo
);
Parameters
x0
|
X position coordinate of the upper left corner of the rectangle to be drawn (Pixel)
|
y0
|
Y position coordinate of the upper left corner of the rectangle to be drawn (Pixel)
|
x1
|
X position coordinate of the lower right corner of the rectangle to be drawn (Pixel)
|
y1
|
Y position coordinate of the lower right corner of the rectangle to be drawn (Pixel)
|
fillColor
|
Fill color of the rectangle to be drawn
|
*ptrProcUnit
|
Pointer to processing unit information
|
imageNo
|
Image number
|
Return Value
Returns 0 when a rectangle is successfully drawn.
Otherwise returns a non-zero value.
Description
Draws a rectangle at the specified position in the Image Display window
Example
int Sample::MeasureDispG(ProcUnit *ptrProcUnit, int subNo, ImageWindow *ptrImageWindow)
{
// Display a rectangle
ptrImageWindow->DrawBox(100, 100, 200, 200);
// Display a rectangle
ptrImageWindow->DrawBox(50, 50, 250, 250, RGB(0, 255, 0));
// Display a rectangle
ptrImageWindow->DrawBox(82.6, 85.8, 210.6, 223.4, ptrProcUnit, 0);
}