GLBasic forum

Main forum => GLBasic - en => Topic started by: Gary on 2011-Apr-25

Title: Rotate and zoom a sprite
Post by: Gary on 2011-Apr-25
Is there a simple way to take a 1024x768 sprite, rotate it by 90 degrees and resize to 320 x 480 (or 640 x 960)?

rotozoomsprite will only let you resize as a percentage of the original and the aspect is not the same for both x and y.

Is the only way to do it is to draw the rotated sprite to a back buffer screen, take that sprite and use zoomsprite to resize it down to the correct size?

thanks
Gary
Title: Re: Rotate and zoom a sprite
Post by: matchy on 2011-Apr-25
Without using grab sprite, here's one simple process:

Create the new sprite with a new screen buffer of size 768x1024.
Draw a rotated sprite (1024x768).
Create another sprite with a new screen buffer of size 320x480.
Stretch draw the first buffer on to that.
Draw second buffer to screen.
Title: Re: Rotate and zoom a sprite
Post by: Moru on 2011-Apr-25
Try polyvector to draw the sprite