Point
 
Returns the color attribute of a specified pixel coordinate

Syntax

result = Point( coord_x, coord_y [,buffer] )

Usage

coord_x
x coordinate of the pixel
coord_y
y coordinate of the pixel
buffer
the image buffer to read from

Return Value

The color attribute at the specified coordinates

Description

GfxLib Function that reads the color of the pixel at the coordinate coord_x, coord_y of the screen, or of buffer, if supplied.
The value return is a color index in a 256 or less color Screen, and a RGB value in true color modes. If the coordinates are off-screen, -1 is returned

The function Point does not work in text modes.

Example

Screen 13 
Line (10,10)-(100,100),12
Print Point(20,20)

Output:
12
Differences from QB

  • None, in the VGA compatible SCREEN modes. In SVGA modes, it returns a RGB value

See also