Page 1 of 1

Screen Data CHUWI

Posted: Thu Sep 21, 2017 7:54 pm
by rbytes
Here is the same screen data program customized for my CHUWI Hi10 tablet. A screen shot is attached.

Code: Select all

''
Screen Data CHUWI by rbytes
September 2017
''

' assign suitable name to file
f="CHUWI Screen Data.txt"
'#.filepos(f,0)

' assign name of your device
d = "CHUWI Hi10 Tablet" + #.lf
send <-> 

' assign specified screen size horizontal and vertical
sw = "9 inches"
sh = "6 inches"
d = "Width measured: " + sw + #.lf+"Height measured: " + sh + #.lf
send <->

d = "Width from specs: 1920 pixels" + #.lf+"Height from specs: 1280 pixels" + #.lf
send <->

' read screen size with dip (device independent points)
#.point(#.dip)
sw, sh = #.scrsize()
d = "With control menu on and dip mode:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

' read dots per inch
d = "Dots per inch from #.scrdpi(): " + #.scrdpi() + #.lf
send <->

' read screen size with pix (individual pixels)
#.point(#.pix)
sw, sh = #.scrsize()
d = "With control menu on and pix mode:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

' read dots per inch
d = "Dots per inch from #.scrdpi(): " + #.scrdpi() + #.lf
send <->

#.scrview(#.normal) ' hide control menu

' read screen size
sw, sh = #.scrsize()
d = "With control menu off:" + #.lf
d += "Width from #.scrsize(): " + sw + #.lf+"Height from #.scrsize(): " + sh
send <->

#.delay(2)
#.end()

' print to screen and save line(s) to file
:send
#.output(d)
#.writeline(f,d)
<-