### QPx_RotatePicture

QPx_RotatePicture(pictVar; numDegrees; rotateOptions; backColor):error
| pictVar | Picture | Picture variable
| numDegrees | Real | Rotation degrees
| rotateOptions | Longint | Options
| backColor | Longint | Background color
| 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. If an error occurs, pictVar is set to an empty picture.

The number of degrees is specified in the numDegrees parameter. Positive values cause clockwise rotation, while negative values rotate the picture counter-clockwise.

The rotateOptions paramater is optional. It can be used to specify options for the rotation operation. The following constants can be combined with bitwise "or".

qpx_RotateHighQuality | 0x0004 | High quality rotation
qpx_RotateFillBackground | 0x0800 | Fill background with specified color

Parameter backColor is also optional, and is meaningful only when the qpx_RotateFillBackground is specified in rotateOptions. It specifies the fill color of the background area when rotating by non-multiples of 90 degrees. 4D's 0xRRGGBB notation is used.

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`

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:43:15