The only change needed to produce the second chart is to uncomment the first line of code! The lower resolution chart is showing the SPL default resolution, which can also be initiated by #.point(#.dip) Device independent points will typically be larger than pixels.
As soon as you uncomment the line #.point(#.pix), the chart code can access all of the screen pixels. In the case of my CHUWI Hi10 tablet, it makes a huge difference.
Code: Select all
''
Screen Test Chart by rbytes
September 2017
''
' comment out the point command for #.dip (device independent points) which gives lower screen resolution.
' uncomment the point command for #.pix (pixels) which gives higher screen resolution.
'#.point(#.pix)
x,y = #.scrsize()
y = #.int(y)
#.scrview(#.normal)
' draw label
#.drawtext(x*.45,y*.45,"Screen Test Chart")
#.drawtext(x*.44,y*.49,"Created on CHUWI Hi10")
? #.scrdpi() = 144, #.drawtext(x*.435,y*.53,"Displayed on CHUWI Hi10")
' draw vertical lines at 100-point intervals
> n, 1..x, 100
#.drawline(n-1,1,n-1,y)
#.drawtext(n-50,2,n-1)
<
' draw borizontal lines at 100-point intervals
> n, 1..y, 100
#.drawline(1,n,x,n)
#.drawtext(50,n-28,n-1)
<
#.drawline(1,1,1,y-1) ' draw left edge
#.drawline(x,1,x,y) ' draw right edge
#.drawline(1,y,x,y) ' draw bottom edge
#.drawline(x*.8,y*.8,x,y-1)
#.drawtext(x*.76,y*.75,x)
#.drawtext(x*.76,y*.75+40,"x "+y)
#.delay(4)