Re: Rotating a pixbuf (free, any number of degrees)
- From: Carlos Eduardo Medaglia Dyonisio <carlos dyonisio digitro com br>
- To: gtk-app-devel-list gnome org
- Subject: Re: Rotating a pixbuf (free, any number of degrees)
- Date: Tue, 24 May 2005 08:34:33 -0300
On Tue, 24 May 2005 13:07:37 +0200
Benjamin Podszun <ben galactic-tales de> wrote:
I'm currently trying to write a small game using GTK (to be honest:
gtk-sharp) and need to rotate an image for my (small, easy, currently
dumb) 2D Game-View.
I found no reference to any GTK-way of doing things like that, but all
"no, you can't do this without writing the code yourself or using 3rd
party libraries" that I found were about 3-4 years old, so I would like
to give it a try again: Is there any native way of archiving what I want?
Hi!
You can use math to do this.
Just multiply every dot of the image by rotation matrix in R2.
Take a look at http://mathworld.wolfram.com/RotationMatrix.html
I don't know if it is the best way, but it works. :)
Regards,
Cadu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]