[Gambas-user] rotating point

Benoît Minisini gambas at ...1...
Thu Jun 25 16:47:53 CEST 2009


> hi,
> I use Gambas 2.12 (at this version "draw.rotate" does not work)
> I want to rotate a market area (Top=207, Left=207, High=110, Width=110)
> in a drawingarea (High=512, Width=512)
>
>     image1 = Drawingarea.Grab().Image
>     image2 = image1.Copy(Top, Left, Width, High) from market area
>     image2.rotate(Rad(degrees)) may be dregree=1-359
>     Draw.Begin(Drawingarea)
>       Draw.Image(Top, Left) from market area
>     Draw.End
>
> It work well, but how can I assign where the rotating point is????
> I want rotate in the middle of market area
>
> Can give someone an idea?
>
> kind regards
> Jürgen

Draw.Rotate() does not exist because it is a lot of work to implement it in 
gb.gtk (Qt supports it natively).

Image.Rotate() rotates the image around its center. The image size is extended 
so that the rotated image is not clipped. But beware that Image.Rotate() *does 
not* modify the original image. The rotated image is returned as a new image!

Can you provide real source code so that we can see what you are really doing?

-- 
Benoît




More information about the User mailing list