QB64pe icon indicating copy to clipboard operation
QB64pe copied to clipboard

POINT(X,Y) uses WINDOW coordinates instead of physical screen coordinates.

Open oitofelix opened this issue 4 months ago • 0 comments

Describe the bug In QBasic the POINT function form used to retrieve color attribute always use physical screen coordinates, regardless of WINDOW. QB64, on the other hand, uses WINDOW logical coordinates.

To Reproduce Run the following code snipet:

SCREEN 7
X = 2: Y = 2
PRINT "No window:", POINT(X, Y)
PRINT "Correct!"
WINDOW (-1, 1)-(1, -1)
PRINT "With WINDOW:", POINT(X, Y)
PRINT "Bug! Should have been:", POINT(PMAP(X, 2), PMAP(Y, 3))
PRINT "With WINDOW using PMAP:", POINT(PMAP(X, 2), PMAP(Y, 3))
PRINT "Bug! Should have been:", POINT(X, Y)

Expected behavior WINDOW should not affect POINT's interpretation of the coordinates in its color attribute form.

Screenshots image

Desktop (please complete the following information):

  • OS: Debian GNU/Linux
  • QB64pe 3.14.1

oitofelix avatar Oct 08 '24 02:10 oitofelix