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

Hierarchy

  • PaintToolsPlugin

Properties

id: string = "paintTools"

Unique plugin identifier.

Plugin options

Constructors

Accessors

  • 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

  • get paintLayer(): IImageLayer
  • Gets the paint layer containing the HTML canvas for drawing the image.

    Returns IImageLayer

  • get naturalSize(): { width: number; height: number }
  • Natural image size.

    Returns { width: number; height: number }

    • width: number
    • height: number
  • get effectsToolbarLayout(): ToolbarItemType[]
  • Retrieves the layout of the effects tools toolbar.

    Returns

    The layout of the effects tools toolbar.

    Returns ToolbarItemType[]

  • get paintToolbarLayout(): ToolbarItemType[]
  • Retrieves the layout of the paint tools toolbar.

    Returns

    The layout of the paint tools toolbar.

    Returns ToolbarItemType[]

  • get textToolbarLayout(): ToolbarItemType[]
  • Retrieves the layout of the text tools toolbar.

    Returns

    The layout of the text tools toolbar.

    Returns ToolbarItemType[]

Methods

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

    Parameters

    Returns boolean

  • Remove and dispose active paint layer.

    Returns void