by Jim the best (3 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 21st June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Rotate a Picture 90, 180 or 270 degrees. (Clockwise)
API Declarations
'This works but it would be better if i could get it to work with paintpicture.
For X = 0 To Picture1.ScaleWidth
For Y = 0 To Picture1.ScaleHeight
Picture2.PSet (Picture2.ScaleHeight - Y, X), Picture1.Point(X, Y)
Next Y
Next X
'270 Degrees (Clockwise)
For X = 0 To Picture1.ScaleWidth
For Y = 0 To Picture1.ScaleHeight
Picture3.PSet (Y, Picture2.ScaleWidth - X), Picture1.Point(X, Y)
Next Y
Next X
'180 Degrees (Clockwise)
For X = 0 To Picture1.ScaleWidth
For Y = 0 To Picture1.ScaleHeight
Picture4.PSet (Picture2.ScaleWidth - X, Picture1.ScaleHeight - Y), Picture1.Point(X, Y)
Next Y
Next X