Gets the internationalization (i18n) instance from the viewer.
The i18n instance.
Returns true if the image is loaded into the viewer and the image format is supported by the plugin.
Natural image size.
Gets the paint layer containing the HTML canvas for drawing the image.
Gets the image viewer instance.
The image viewer instance.
Returns the layout for the effects tools toolbar.
If the value is true, undefined, or null, a default layout is returned.
If the value is false, an empty layout is returned.
Otherwise, the provided custom layout is used.
An array of toolbar item types.
Returns the layout for the paint tools toolbar.
If the value is true, undefined, or null, a default layout is returned.
If the value is false, an empty layout is returned.
Otherwise, the provided custom layout is used.
An array of toolbar item types.
Returns the layout for the text tools toolbar.
If the value is true, undefined, or null, a default layout is returned.
If the value is false, an empty layout is returned.
Otherwise, the provided custom layout is used.
This option is deprecated in favor of the "Text and Objects" toolbar, where text tools are available directly.
objectsToolbarLayout
An array of toolbar item types.
Returns the layout for the objects toolbar.
If the value is true, undefined, or null, a default layout is returned.
If the value is false, an empty layout is returned.
Otherwise, the provided custom layout is used.
An array of toolbar item types.
Determines whether the specified image format is supported for modifications.
True if the format is supported for modifications, false otherwise.
The following formats are explicitly not supported:
// Check if PNG is supported
const supported = isImageFormatSupported(ImageFormatCode.PNG);
// Check if an unknown format is supported (returns false by default)
const supported = isImageFormatSupported('custom-format');
// Check if an unknown format is supported (returns true when allowUnknown is true)
const supported = isImageFormatSupported('custom-format', true);
The image format to check, either as an enum value or string.
Optional allowUnknown: booleanIf true, allows unknown formats (ImageFormatCode.Default) to be considered supported.
Readonly idUnique plugin identifier.
Plugin options
PaintToolsPlugin constructor.
Optional options: PaintToolsPluginOptionsplugin options
PaintToolsPlugin class. Adds the "Paint tools", "Effects" and "Text and Objects" buttons.
Example
Param