[]
Document Solutions Image Viewer - v7.2.0 / RotationPlugin
RotationPlugin class. Adds the "Rotate Image" button.
Deprecated
Deprecated in favor of PageToolsPlugin.
Description
Available options are:
Example
<script src="gcimageviewer.js"></script></head>
<script src="plugins/rotation.js"></script>
<script>
var viewer = new GcImageViewer("#root");
viewer.addPlugin(new RotationPlugin());
</script>
Param
• Readonly
id: string
= "rotation"
Unique plugin identifier.
• options: RotationPluginOptions
Plugin options
• new RotationPlugin(options?
)
RotationPlugin constructor.
Name | Type |
---|---|
options? |
RotationPluginOptions |
▸ getRotation(): number
Specifies the rotation in degrees.
number
▸ setRotation(val
): Promise
<boolean
>
Specifies the rotation in degrees.
Name | Type |
---|---|
val |
number |
Promise
<boolean
>
▸ isImageFormatSupported(imageFormat
): boolean
Checks if the image format specified by the imageFormat parameter is supported.
Name | Type |
---|---|
imageFormat |
string | ImageFormatCode |
boolean
▸ flip(horizontal?
, vertical?
): Promise
<boolean
>
Flip image.
Name | Type | Default value |
---|---|---|
horizontal |
boolean |
true |
vertical |
boolean |
false |
Promise
<boolean
>
▸ flipHorizontal(): Promise
<boolean
>
Flip image horizontally.
Promise
<boolean
>
▸ flipVertical(): Promise
<boolean
>
Flip image vertically.
Promise
<boolean
>