[]
RotationPlugin class. Adds the "Rotate Image" button.
Deprecated in favor of PageToolsPlugin.
Available options are:
<script src="gcimageviewer.js"></script></head>
<script src="plugins/rotation.js"></script>
<script>
var viewer = new GcImageViewer("#root");
viewer.addPlugin(new RotationPlugin());
</script>
ImageViewerPluginBasenew RotationPlugin(options?): RotationPlugin;
RotationPlugin constructor.
RotationPlugin
ImageViewerPluginBase.constructor
readonly id: PluginType;
Unique plugin identifier.
ImageViewerPluginBase.id
options: RotationPluginOptions;
Plugin options
get in17n(): i18n;
Gets the internationalization (i18n) instance from the viewer.
i18n
The i18n instance.
ImageViewerPluginBase.in17n
get isReady(): boolean;
Returns true if the image is loaded into the viewer and the image format is supported by the plugin.
boolean
ImageViewerPluginBase.isReady
get naturalSize(): object;
Natural image size.
object
height: number;
width: number;
ImageViewerPluginBase.naturalSize
get paintLayer(): IImageLayer;
Gets the paint layer containing the HTML canvas for drawing the image.
ImageViewerPluginBase.paintLayer
get viewer(): IImageViewer;
Gets the image viewer instance.
The image viewer instance.
ImageViewerPluginBase.viewer
dispose(): void;
Cleans up resources and disposes the plugin.
void
ImageViewerPluginBase.dispose
flip(horizontal?, vertical?): Promise<boolean>;
Flip image.
boolean
boolean
Promise<boolean>
flipHorizontal(): Promise<boolean>;
Flip image horizontally.
Promise<boolean>
flipVertical(): Promise<boolean>;
Flip image vertically.
Promise<boolean>
getRotation(): number;
Specifies the rotation in degrees.
number
initialize(viewer): void;
Initializes the plugin with the given image viewer.
any
The image viewer instance to associate with this plugin.
void
ImageViewerPluginBase.initialize
isImageFormatSupported(imageFormat): boolean;
Checks if the image format specified by the imageFormat parameter is supported.
string | ImageFormatCode
boolean
ImageViewerPluginBase.isImageFormatSupported
removePaintLayer(): void;
Removes and disposes the active paint layer. If no paint layer exists, this method does nothing.
void
ImageViewerPluginBase.removePaintLayer
setRotation(val): Promise<boolean>;
Specifies the rotation in degrees.
number
Promise<boolean>