GLBasic forum

Main forum => GLBasic - en => Topic started by: Gary on 2010-Mar-01

Title: rotate and resize a whole screen
Post by: Gary on 2010-Mar-01
Is there a simple way of rotating and resizing a screen before the showscreen command? What I am try to do is port my iphone app to the gp2x quickly and obviously the main difference is the screen size. Rather than redo all my graphics I want to just use the standard iphone graphics and then before displaying I rotate and resize for the gp2x.

Thanks in advance

Gary
Title: Re: rotate and resize a whole screen
Post by: FutureCow on 2010-Mar-01
My suggestion is to draw to a virtual screen which corresponds to a sprite number. You can then use STRETCHSPRITE to draw that sprite at the size you wish

Code (glbasic) Select
CREATESCREEN [screen number],[sprite number], [iphone screen width], [height]
USESCREEN [screen number as above]
[Do all your drawing commands here]
USESCREEN -1 // reset back so you're drawing to the real screen
STRETCHSPRITE [sprite number as above],0,0,[gp2x screen width],[gp2x screen height]
SHOWSCREEN