This method rotates a raster image.

[Visual Basic] Public Function Rotate(angle As Integer, xTurn As Boolean, yTurn As Boolean, mode As Boolean, red As Byte, green As Byte, blue As Byte, clip As Boolean) As Boolean
[C#] public bool Rotate(int angle, bool xTurn, bool yTurn, bool mode, byte red, byte green, byte blue, bool clip);

Parameters

angle
     Angle of rotation (-35999 to 35999, in 1/100 degree units)

xTurn
     Reverses image along the x axis (False: no reversal, True: reversal)

yTurn
     Reverses image along the y axis (False: no reversal, True: 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: no clipping, True: clipping)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The Rotate 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 Rotate method, set the image handle of the image in the SourceImage property. The Rotate 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 SourceMask property.

If successful the resulting raster image data is set in the DestinationImage property. If a mask image is used, the mask image should be set in the SourceMask property. The resulting mask image will be set in the DestinationMask property.

See Also

Effect Class | Effect Members

The ImageKit.NET X is created by Newtone Corporation