Author Topic: SCREEN 13 (NOT) bug - SOLVED  (Read 2249 times)

0 Members and 1 Guest are viewing this topic.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
SCREEN 13 (NOT) bug - SOLVED
« 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.
« Last Edit: January 08, 2019, 05:00:26 am by Petr »

Marked as best answer by Petr on January 08, 2019, 06:00:15 am

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: SCREEN 13 bug
« Reply #1 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.
« Last Edit: January 08, 2019, 04:25:26 am by Bert22306 »

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: SCREEN 13 bug - solved
« Reply #2 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....