[]
        
(Showing Draft Content)

IPaintObject

Document Solutions Image Viewer - v8.0.0 / IPaintObject

Interface: IPaintObject

Paint object to be drawn to the canvas.

Table of contents

Methods

Methods

draw

draw(destCtx, mainCtx, backCtx, params?): any

Draw object to the canvas.

Parameters

Name Type
destCtx CanvasRenderingContext2D
mainCtx CanvasRenderingContext2D
backCtx CanvasRenderingContext2D
params? PaintObjectParameters

Returns

any


getContentSize

getContentSize(ctx): Size

Gets object contents rectangle size.

Parameters

Name Type
ctx CanvasRenderingContext2D

Returns

Size


getProperty

getProperty(propertyName): any

Get paint object property, e.g. fontSize, fontName, text and so on.

Parameters

Name Type
propertyName PaintObjectPropertyName

Returns

any


setProperty

setProperty(propertyName, value): boolean

Set paint object property, e.g. fontSize, fontName, text and so on.

Parameters

Name Type
propertyName PaintObjectPropertyName
value any

Returns

boolean