If I create an roScreen with a specific dimension:
screen=createobject("roscreen",false,1280,720)
Then no matter what the settings are on the device, the screen responds as if it is 1280x720, and screen.getwidth() will always return 1280, screen.getheight() will always return 720.
If on the other hand, I choose to omit the dimensions, then the screen by will be either 1280 x 720 for either HDTV mode, or 720 x 480 for SDTV mode. In short, the developer really never needs to worry about 16x9 mode, except for one thing:, squished or stretched images may occur.
Using the "always 1280" screen dimensions will make a circle into an egg in 4:3 mode, but will look fine in 16:9 mode, and using the "let the system choose roScreen Dimensions" approach will make a circle into an egg in 16:9 mode.
sub main()
screen=createobject("roscreen",false) 'roScreen dimensions based on device setting
'screen=createobject("roscreen",false,1280,720) 'roScreen dimensions chosen by developer
print screen.getwidth(), screen.getheight()
xcenter=int(screen.getwidth() /2)
ycenter=int(screen.getheight() /2)
radius=200
r2=radius*radius
for x=-radius to radius
s=sqr(r2-x*x)+0.5
y=int(s)
screen.drawline(xcenter+x,ycenter+y,xcenter+x,ycenter-y,&hffffffff)
end for
screen.finish()
sleep(5000)
end sub
- Joel