This method rotates a raster image.

[C++Builder]   [ bool = ]imagekitcontrolname->Effect->Rotation(int Angle, bool TurnX, bool TurnY, bool Mode, short Red, short Green, short Blue, bool Clip)
[Delphi]   [ Boolean = ]imagekitcontrolname.Effect.Rotation(Angle: Integer; TurnX, TurnY, Mode: Boolean; Red, Green, Blue: Smallint; Clip: Boolean)

Parameters

Name Explanation
Angle Angle of rotation (-35999 to 35999, in 1/100 degree units)
TurnX Reverses image along the x axis (False(0): no reversal, True (nonzero): reversal)
TurnY Reverses image along the y axis (False(0): no reversal, True (nonzero): reversal)
Mode Sets whether on not linear interpolation is used (False: does not interpolate, True: interpolates). Interpolation is enabled for 8 bit grayscale, 16, 24, and 32 bit images only
Red The red component of the background color (from 0 to 255)
Green The green component of the background color (from 0 to 255)
Blue The blue component of the background color (from 0 to 255)
Clip Sets whether or not the image is clipped. (False(0): no clipping, True(nonzero): clipping)

Return Value

Returns True if successful, otherwise returns False.

Explanation

The Rotation method rotates a raster image. If the Angle parameter value is positive, the image is rotated counterclockwise, if the Angle parameter value is negative, the image is rotated clockwise. When the Clip parameter is True and the rotated image is larger than the original, the excess areas are cut.

To execute the Rotation method, set the image handle of the image in the ImageHandle property or the Layer(LayerNo).ImageHandle property. The Rotation method supports 1, 4, 8, 16, 24, and 32 bit images. It is possible to rotate a mask image at the same time that the image is rotated. If this is the case, set the image handle of the mask image to be processed in the MaskImageHandle property.

If successful the resulting raster image data is set in the LayerNo property (the ImageHandle property or the Layer(LayerNo).ImageHandle property. If a mask image is used, the mask image should be set in the MaskImageHandle property. If unsuccessful, 0 is returned.

When the Caption, Message, and ButtonName properties are blank, the progress dialog box will not be displayed. When the progress dialog box is displayed, the percentage that the processing has completed will be shown in the dialog box.

The ImageKit9 VCL is a product created by Newtone Corporation