[Gambas-user] What is measured by "Angle"?

Matti math.eber at ...221...
Wed Feb 15 22:21:06 CET 2012


Yes, of course, if you know the radians, it is easy, and you can just enter the 
Float.
But if you have a user input that usually is in degrees, you have to convert it 
via Rad().
It is just a matter of what input you get.


Am 15.02.2012 22:05, schrieb Ru Vuott:
>
>> So, to rotate 90°, you have to do:
>> hImg = hImg.Rotate(Rad(90))
>
> ...I noticed that I can rotate an "image" by:
> hImg = hImg.Rotate(Pi(0.5))
>
>    and simply:
>
> hImg = hImg.Rotate(1.58)
>
>
>
> Example:
>
> Public Sub button2_Click()
>
> Dim i As Image
> Dim p As Picture
>
>   i = Image.Load("/iter/mea_immago.gif")
>
>   i = i.Rotate(1.58)   '...or .Rotate(Pi(0.5))
>
>    p = i.picture
>
>    PictureBox1.Picture = p
>
> End
>




More information about the User mailing list