[Gambas-user] image rotate

Matti math.eber at ...221...
Sun Apr 10 18:08:37 CEST 2011


If you want to do image maipulations, it is much easier to use DrawingArea
instead of PictureBox (Benoît had to convice me first, too).

Try something like:

hImage = hImage.Rotate(Rad(95))
DrawingArea1.Refresh
' This raises the following Drawing Event of DrawingArea1

Public Sub DrawingArea1_Draw()

  Draw.Image(hImage, X, Y (, Width, Height))

End

That's all!

Regards
Matti


Am 10.04.2011 12:53, schrieb Ondrej Beranek:
> I have pictureBox as canavas for displayg output of vga cam
> 
> 2011/4/10 Benoît Minisini <gambas at ...1...>
> 
>>> but it not worki'n
>>>
>>> I solve that with copy pictrure to separate variable, rotate it by
>> property
>>> rotate() and after that bring it back...
>>>
>>> this code
>>>
>>>   DIM mypic AS image
>>>   mypic = PictureBox1.Picture.Image
>>>   mypic = mypic.Rotate(Rad(95))
>>>
>>>   PictureBox1.Picture = mypic.Picture
>>>
>>> but this is very slow solution. Any idea how to make it faster ?
>>>
>>>
>>
>> Don't use a Picture box. Draw you rotated picture from the "Draw" event of
>> a
>> DrawingArea.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Xperia(TM) PLAY
>> It's a major breakthrough. An authentic gaming
>> smartphone on the nation's most reliable network.
>> And it wants your games.
>> http://p.sf.net/sfu/verizon-sfdev
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list