QB64-Phoenix-Edition / QB64pe

The QB64 Phoenix Edition Repository
https://qb64phoenix.com
Other
124 stars 26 forks source link

VIEW and WINDOW do not work together. #545

Open oitofelix opened 5 days ago

oitofelix commented 5 days ago

Describe the bug Drawing statements don't work properly when both VIEW and WINDOW are active.

To Reproduce Run the folowing program.

SCREEN 7: _FULLSCREEN

WINDOW (-1, 1)-(1, -1)
WXMin = -.5: WYMin = -.5
WXMax = .5: WYMax = .5
VXMin = PMAP(WXMin, 0): VYMin = PMAP(WYMin, 1)
VXMax = PMAP(WXMax, 0): VYMax = PMAP(WYMax, 1)

PRINT "No WINDOW nor VIEW active."
PRINT "This work as expected."
VIEW SCREEN(VXMin, VYMin)-(VXMax, VYMax), , 4
VIEW
WINDOW
LINE (VXMin, VYMin)-(VXMax, VYMax)
SLEEP

CLS
PRINT "Only WINDOW active."
PRINT "This work as expected."
WINDOW (-1, 1)-(1, -1)
VIEW SCREEN(VXMin, VYMin)-(VXMax, VYMax), , 4
VIEW
LINE (WXMin, WYMin)-(WXMax, WYMax)
SLEEP

CLS 0
PRINT "Only VIEW active."
PRINT "This work as expected."
WINDOW
VIEW SCREEN(VXMin, VYMin)-(VXMax, VYMax), , 4
LINE (VXMin, VYMin)-(VXMax, VYMax)
SLEEP

CLS 0
PRINT "Both WINDOW and VIEW active."
PRINT "Bug!  This does not work as expected."
WINDOW (-1, 1)-(1, -1)
VIEW SCREEN(VXMin, VYMin)-(VXMax, VYMax), , 4
LINE (WXMin, WYMin)-(WXMax, WYMax)

Expected behavior The drawing behavior must be the same for equivalent drawing statements, regardless of WINDOW and VIEW effects.

Screenshots image image image image

Desktop (please complete the following information):