Wednesday, September 21, 2022

🆕 POINT

 The POINT function returns the pixel COLOR attribute at a specified graphics coordinate.

Syntax

POINT (x,y)

xthe horizontal coordinate on the screen, which is an integer number, one of: a literal integer, an integer variable, or a numeric expression resulting in an integer
ythe horizontal coordinate on the screen, which is an integer number, one of: a literal integer, an integer variable, or a numeric expression resulting in an integer


BAM's implementation or POINT is partially compatible with both GW-BASIC and QB64PE.

In GW-BASIC and QB64, the POINT function has two syntax forms: the first returns the pixel color attribute at a specified graphics coordinate, and the second syntax returns the pixel color at the current graphic cursor position.


Purpose:

To read the color or attribute value of a pixel from the screen.

Syntax:

POINT(x,y)
POINT(function)

Comments:

In the first syntax, x and y are coordinates of the point to be examined.

If the point given is out of range, the value -1 is returned.

POINT with one argument allows you to retrieve the current graphics coordinates.

POINT(function) returns the value of the current x or y graphics coordinates as follows:

FunctionReturns
0the current physical x coordinate.
1the current physical y coordinate.
2the current logical x coordinate if WINDOW is active; otherwise, it returns the current physical x coordinate as in 0 above.
3the current logical y coordinate if WINDOW is active; otherwise, it returns the current physical y coordinate as in 1 above.

No comments:

Post a Comment

🖥 Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...