[]
        
(Showing Draft Content)

PaintToolsPlugin

Document Solutions Image Viewer - v8.0.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

effectsToolbarLayout

get effectsToolbarLayout(): ToolbarItemType[]

Retrieves the layout of the effects tools toolbar.

Returns

ToolbarItemType[]

The layout of the effects tools toolbar.


paintToolbarLayout

get paintToolbarLayout(): ToolbarItemType[]

Retrieves the layout of the paint tools toolbar.

Returns

ToolbarItemType[]

The layout of the paint tools toolbar.


textToolbarLayout

get textToolbarLayout(): ToolbarItemType[]

Retrieves the layout of the text tools toolbar.

Returns

ToolbarItemType[]

The layout of the text tools toolbar.

Methods

isImageFormatSupported

isImageFormatSupported(imageFormat, allowUnknown?): boolean

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

Parameters

Name Type
imageFormat string | ImageFormatCode
allowUnknown? boolean

Returns

boolean


removePaintLayer

removePaintLayer(): void

Remove and dispose active paint layer.

Returns

void