ImageTaskBase<T>.Rotate Method
Definition
- Namespace
- GleamTech.ImageUltimate
- Assembly
- GleamTech.ImageUltimate.dll
Rotates the current image by the given angle. The command is added to the chain and not executed until the actual processing is done.
public T Rotate(double angle, Color? backgroundColor = null)
Parameters
angledoubleThe angle in degrees to rotate the image by. A positive degree will cause a clockwise rotation and a negative degree will cause a counter-clockwise rotation. Angles of 90, 180, or 270 degrees will use a special algorithm for higher performance.
backgroundColorColor?The background color for the rotated image. Default color is transparent. If the rotated image is not rectangular (ie. angle is not 90, 180, or 270 degrees), it will be padded with the background color to get a rectangular image.
Returns
- T
The same instance of this class.
Examples
caller
A GleamTech.Drawing.Color parameter/property can be implicitly (automatically) cast from/to other image libraries:
- System.Drawing.Color
- SixLabors.ImageSharp.Color, SixLabors.ImageSharp.PixelFormats
- SkiaSharp.SKColor
- Microsoft.Maui.Graphics.Color