Saturday, November 5, 2022

❇ POINT: Added syntax option to get current graphics X or Y coordinate.

EDIT: Also Fixed: Issue with POINT(x,y) not working in "rgba" SCREEN modes.  (Details)

This enhances the version of the function first implemented in BASIC Anywhere Machine last September.

Now:

POINT

Description:

The POINT function returns the pixel COLOR attribute at a specified graphics coordinate, OR: it returns the current graphics X coordinate or Y coordinate.

Syntax

To get the color attribute at a specified graphics coordinate:

POINT (x,y)

To get a current graphics coordinate:

POINT (coordinate_id)

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
coordinate_ida value of 0 (or 2) will cause the function to return the current graphics or X
a value 1 (or 3) will cause the function to return the current graphics or X
(values of 2 and 3 included for semi-compatibility with GW-BASIC)

To see the function in action, check out the "Snowflake" program:






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...