A question about graphics

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

A question about graphics

Post 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?
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: A question about graphics

Post 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)

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: A question about graphics

Post 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
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: A question about graphics

Post 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)
  <
<

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: A question about graphics

Post by rbytes »

Looked just like a grey screen until I magnified it.

Screenshot (23).png
Screenshot (23).png (51.45 KiB) Viewed 4522 times
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: A question about graphics

Post by Mr. Kibernetik »

Very interesting...

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: A question about graphics

Post 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?
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: A question about graphics

Post by Mr. Kibernetik »

At first, what I have on my computer:
Снимок.PNG
Снимок.PNG (11.86 KiB) Viewed 4517 times

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: A question about graphics

Post 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.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: A question about graphics

Post 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?
The only thing that gets me down is gravity...

Post Reply