[]
        
(Showing Draft Content)

PaintToolsPlugin

Document Solutions Image Viewer - v7.1.0 / PaintToolsPlugin

Class: 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

Table of contents

Properties

Constructors

Accessors

Methods

Properties

id

Readonly id: string = "paintTools"

Unique plugin identifier.


options

options: PaintToolsPluginOptions

Plugin options

Constructors

constructor

new PaintToolsPlugin(options?)

PaintToolsPlugin constructor.

Parameters

Name Type Description
options? PaintToolsPluginOptions plugin options

Accessors

isReady

get isReady(): boolean

Returns true if the image is loaded into the viewer and the image format is supported by the Paint Tools plugin.

Returns

boolean


paintLayer

get paintLayer(): IImageLayer

Gets the paint layer containing the HTML canvas for drawing the image.

Returns

IImageLayer


naturalSize

get naturalSize(): Object

Natural image size.

Returns

Object

Name Type
width number
height number

Methods

isImageFormatSupported

isImageFormatSupported(imageFormat, allowUnknown?): boolean

Checks if the image format specified by the imageFormat parameter is supported.

Parameters

Name Type
imageFormat string | GcImageFormat
allowUnknown? boolean

Returns

boolean


removePaintLayer

removePaintLayer(): void

Remove and dispose active paint layer.

Returns

void