Re: [Gambas-user] gb.image: how to keep a rotated image centered

2010-08-11 Thread kevinfishburne
Jussi Lahtinen wrote: > > There is probably more efficient ways, but quick and dirty... > Great minds must think alike. I didn't receive a notification email about your post for some reason, but independently developed the same code almost exactly. Crazy, huh? Your code (and my code) do the tr

[Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread Kevin Fishburne
"old" Nabble is falling apart. It seems to randomly fail to accept my posts. Good times. Anyway, here's the post bypassing Nabble: I'm attempting to rotate an image about its center point, using something like: DIM background AS Image = Image.Load("grass.png") DIM f AS Float F

Re: [Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread Jussi Lahtinen
There is probably more efficient ways, but quick and dirty... Here: DIM background AS Image = Image.Load("kuva1.jpg") DIM bg2 AS Image DIM f AS Float DIM ii AS Integer DIM jj AS Integer ii = background.Width / 2 jj = background.Height / 2 FOR f = 0 TO 6.2831853 STEP 0.01 Draw.Begin(DrawingArea

[Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread kevinfishburne
I'm attempting to rotate an image about its center point, using something like: DIM background AS Image = Image.Load("grass.png") DIM f AS Float FOR f = 0 TO 6.2831853 STEP 0.01 Draw.Begin(DrawingArea) Draw.Image(background.Rotate(f), 0, 0) Draw.End WAIT NEXT The resolution of the ret