[]
Document Solutions Image Viewer - v8.0.0 / PaintToolsPlugin
PaintToolsPlugin class. Adds the "Paint tools" and "Text tool" buttons.
Example
<script src="gcimageviewer.js"></script></head>
<script src="plugins/paintTools.js"></script>
<script>
var viewer = new GcImageViewer("#root");
viewer.addPlugin(new PaintToolsPlugin());
</script>
Param
• Readonly
id: string
= "paintTools"
Unique plugin identifier.
• options: PaintToolsPluginOptions
Plugin options
• new PaintToolsPlugin(options?
)
PaintToolsPlugin constructor.
Name | Type | Description |
---|---|---|
options? |
PaintToolsPluginOptions |
plugin options |
• get
isReady(): boolean
Returns true if the image is loaded into the viewer and the image format is supported by the Paint Tools plugin.
boolean
• get
paintLayer(): IImageLayer
Gets the paint layer containing the HTML canvas for drawing the image.
• get
naturalSize(): Object
Natural image size.
Object
Name | Type |
---|---|
width |
number |
height |
number |
• get
effectsToolbarLayout(): ToolbarItemType
[]
Retrieves the layout of the effects tools toolbar.
The layout of the effects tools toolbar.
• get
paintToolbarLayout(): ToolbarItemType
[]
Retrieves the layout of the paint tools toolbar.
The layout of the paint tools toolbar.
• get
textToolbarLayout(): ToolbarItemType
[]
Retrieves the layout of the text tools toolbar.
The layout of the text tools toolbar.
▸ isImageFormatSupported(imageFormat
, allowUnknown?
): boolean
Checks if the image format specified by the imageFormat parameter is supported.
Name | Type |
---|---|
imageFormat |
string | ImageFormatCode |
allowUnknown? |
boolean |
boolean
▸ removePaintLayer(): void
Remove and dispose active paint layer.
void