getPoint

getPoint(x1: Real;
         y1: Real): Integer;

The getPoint method of the Window class returns the color of the pixel at the specified coordinates on the screen. The point must be physically visible and within the referenced form or control. If it is not, the getPoint method does nothing. The x1 and y1 parameters are the coordinates of the point.

Only devices that support raster operations can use this function.

The code fragment in the following example shows the use of the getPoint method.

if getPoint (1,2) <> Blue then
    picturePreview.drawFilledRectangle(1, 2, 30, 5, Blue);
    picturePreview.drawFilledRectangle(picturePreview.scaleWidth-12,
              2, picturePreview.scaleWidth, 5, Blue);
    picturePreview.drawLine(1, 7, picturePreview.scaleWidth, 7, Red);
endif;