Page 1 of 2

A question about graphics

Posted: Sun Sep 03, 2017 11:42 pm
by rbytes
In Smart Basic I understand how pixels and points map to the screen of my iPad. How is it done in SPL? My CHUWI Hi10 tablet has a 1920 x 1200 pixel screen, but my best guess is that SPL drawing commands are addressing points of 2 x 2 pixels. Is there any plan to add pixel drawing in future?

Re: A question about graphics

Posted: Sun Sep 03, 2017 11:45 pm
by Mr. Kibernetik
So what screen size does SPL report when you maximize your screen?

Code: Select all

x,y=#.scrsize()
#.output(x," x ",y)

Re: A question about graphics

Posted: Sun Sep 03, 2017 11:55 pm
by rbytes
A very odd result. Neither dimension matches my screen, and neither is an even fraction of its actual size of 1920 x 1200

1232 x 813.333312988281

Re: A question about graphics

Posted: Mon Sep 04, 2017 12:02 am
by Mr. Kibernetik
You also can check this program. It draws checkerboard using each point. Magnifying glass will be required :)

Code: Select all

mx,my=10'#.scrsize()
#.aaoff()
>y,0..my
  >x,y%2..mx,2
    #.drawpoint(x,y)
  <
<

Re: A question about graphics

Posted: Mon Sep 04, 2017 12:47 am
by rbytes
Looked just like a grey screen until I magnified it.

Screenshot (23).png
Screenshot (23).png (51.45 KiB) Viewed 4458 times

Re: A question about graphics

Posted: Mon Sep 04, 2017 10:29 am
by Mr. Kibernetik
Very interesting...

Re: A question about graphics

Posted: Mon Sep 04, 2017 10:41 am
by rbytes
I looked at the graphics settings of Windows 10 on my tablet. It is set for 1920 x 1280. Note that that still doesn't match the Hi10's hardware resolution of 1920 x 1200, but it is a lot closer than what is reported by SPL. What do you use to determine the screen size for SPL?

Re: A question about graphics

Posted: Mon Sep 04, 2017 10:46 am
by Mr. Kibernetik
At first, what I have on my computer:
Снимок.PNG
Снимок.PNG (11.86 KiB) Viewed 4453 times

Re: A question about graphics

Posted: Mon Sep 04, 2017 10:57 am
by Mr. Kibernetik
It will be very interesting if you post a full screenshot but only when 10 points are drawn, together with SPL app title - it can be done with Scissors using Window capture mode.

SPL currently uses independent device units as they are estimated by UWP layout engine.

Re: A question about graphics

Posted: Mon Sep 04, 2017 11:02 am
by rbytes
It will be very interesting if you post a full screenshot but only when 10 points are drawn, together with SPL app title
I'm not quite sure what this means. Can you send me the code to draw exactly what you need?