Documentation / Marblecore Imaging / Methods / Rotate
Rotate method
Rotates the image with the specified number of degrees with high precision and quality (rotate by shear).
Syntax
Boolean Rotate(nDegrees As Number (floating point), nRotation As Rotation, nBackgroundColor As Number, nBackgroundOpacity As Number)
Return value
Returns true if the function succeeded.
Parameters
Parameter | Type | Required | Description |
nDegrees | Number (floating point) | Yes | Specifies the number of the degrees to rotate. Can be any value between -360.0 and 360.0. |
nRotation | Rotation (Enumeration) | No | Specifies the rotation method. |
nBackgroundColor | Number | No | Optional parameter which specifies the background color. If omitted, the default background color will be used. |
nBackgroundOpacity | Number | No | Optional parameter which specifies the opacity of the background color. |
Example
The example below shows the effect of this method and how to use it. You can slide the marker in the before/after picture to see the difference. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
1
2 MarblecoreImaging.LoadFromFile("example-rotate-before.jpg");
3
4
5 MarblecoreImaging.Rotate(5, "Expand");
6
7
8 MarblecoreImaging.SaveToFile("example-rotate-after.jpg");
Category
Transformations
See also
Clear |
Crop |
Expand |
FlipHorizontal |
FlipVertical |
Opacity |
Resize |
RotateLeft |
RotateRight |
RoundEdges |
Shear |
Shrink |
Skew |
Straighten |
Thumbnail