QPix Command Reference
![]() |
![]() ![]() |
QPx_RotatePicture(pictVar; numDegrees):error | |||
![]() |
pictVar | Picture | Picture variable |
![]() |
numDegrees | Real | Rotation degrees |
![]() |
error | Longint | Error result |
Rotates a picture variable by a number of degrees.
The source picture is passed in the pictVar parameter. The source picture may be compressed or uncompressed. The rotated picture is also returned in the pictVar parameter and it is always uncompressed.
The number of degrees is specified in the numDegrees parameter. Positive values cause clockwise rotation, while negative values rotate the picture counter-clockwise.
Tip: You can decompress a compressed picture by using QPx_RotatePicture($pict;0)
Example
`Rotate gp_OriginalPicture by gl_degrees and get `the result in gp_RotatedPicture C_PICTURE($pict) C_LONGINT($error) C_REAL(gl_degrees) $pict:= gp_OriginalPicture $error:=QPx_RotatePicture ($pict;gl_degrees) If ($error=qpx_noErr) gp_RotatedPicture:=$pict End if |