ImageWindow::DrawPolygon

Draws a polygon in the Image Display window

int DrawPolygon(
   int  count,
   int  *x,
   int  *y
);

int DrawPolygon(
   int  count,
   int  *x,
   int  *y,
   ProcUnit     *ptrProcUnit,
   int  imageNo
);

int DrawPolygon(
   int  count,
   double       *x,
   double       *y,
   ProcUnit     *ptrProcUnit,
   int  imageNo
);

Parameters
count
The number of vertexes of the polygon to be drawn
*x
Starting address of each vertex X coordinate array of the polygon to be drawn (Pixel)
*y
Starting address of each vertex Y coordinate array of the polygon to be drawn (Pixel)
*ptrProcUnit
Pointer to processing unit information
imageNo
Image number

Return Value
Returns 0 when a polygon is successfully drawn.
Otherwise returns a non-zero value.

Description
Draws a polygon at the specified position in the Image Display window.

Example
    int Sample::MeasureDispG(ProcUnit *ptrProcUnit, int subNo, ImageWindow *ptrImageWindow)
    {
        int x[3] = {10, 20, 30};
        int y[3] = {50, 40, 30};

        // Display a polygon

        ptrImageWindow->DrawPolygon(3, x, y);

        // Display a polygon

        ptrImageWindow->DrawPolygon(3, x, y, ptrProcUnit, 0);

        double x1[3] = {9.5, 18.5, 34.7};
        double y1[3] = {55.2, 43.8, 32.9};

        // Display a polygon

        ptrImageWindow->DrawPolygon(3, x1, y1, ptrProcUnit, 0);
    }