QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Petr on January 08, 2019, 02:54:10 am

Title: SCREEN 13 (NOT) bug - SOLVED
Post by: Petr on January 08, 2019, 02:54:10 am
Question: Why is the circle not touching all the edges of the square?

With this
SCREEN _NEWIMAGE(100, 100, 256)
it works fine. But if use:

SCREEN 13
LINE (0, 0)-(100, 100), , B
CIRCLE (50, 50), 50

In my opinion, the aspect ratio of the overall screen resolution should not affect the draw, because the circle and square coordinates are not meaningful for SCREEN 13. But if I change the aspect ratio with NEWIMAGE, the result is still correct.
Title: Re: SCREEN 13 bug
Post by: Bert22306 on January 08, 2019, 04:17:09 am
SCREEN 12 works perfectly.

And try this, because it too works perfectly.

SCREEN 13
LINE (0, 0)-(100, 100), , B
CIRCLE (50, 50), 50, , , , 1

The problem is that the circle comes out as an ellipse, if you don't specify an aspect ratio in SCREEN 13. So, if you specify aspect ratio 1, the circle is round, and touches the lines of the box. Otherwise, the circle gets an aspect ratio of about 0.8, instead of defaulting to 1.
Title: Re: SCREEN 13 bug - solved
Post by: Petr on January 08, 2019, 04:59:32 am
Hi Bert, thank for reply. I test it also in QB 4.5 and become the same output. So it is so for back compatibility....