Rotate a picture through any angle.
Rotate a picture through any angle.
API Declarations
'Set the DrawWidth two 2 or 3 to avoid gaps.
Rate Rotate a picture through any angle.
(1(1 Vote))
Private Sub Command1_Click()
Picture2.Cls
For x = 1 To Picture1.ScaleWidth
For y = 1 To Picture1.ScaleHeight
R = Sqr(x ^ 2 + y ^ 2)
Angle = Atn(y / x)
New_Angle = Angle + (Text1.Text * Pi / 180)
New_x = R * Cos(New_Angle)
new_y = R * Sin(New_Angle)
Picture2.PSet (Picture2.ScaleWidth / 2 + New_x, Picture2.ScaleHeight / 2 + new_y), Picture1.Point(x, y)
Next y
Next x
End Sub
Private Sub Form_Load()
Text1.Text = 0
Command1.Value = True
End Sub
Rotate a picture through any angle. Comments
No comments yet — be the first to post one!
Post a Comment