Class Canvas
Build from Canvas.h
Krita 4.0.0

Canvas wraps the canvas inside a view on an image/document. It is responsible for the view parameters of the document: zoom, rotation, mirror, wraparound and instant preview.

Methods

levelOfDetailMode()bool mirror()bool resetRotation() resetZoom() rotation()float setLevelOfDetailMode(enable: bool) setMirror(value: bool) setRotation(angle: float) setWrapAroundMode(enable: bool) setZoomLevel(value: float) view()View wrapAroundMode()bool zoomLevel()float

Member documentation

levelOfDetailMode()bool
Krita 4.0.0

Return

true if the canvas is in Instant Preview mode, false if not. Only when OpenGL is enabled, is Instant Preview mode available.

mirror()bool
Krita 4.0.0

Return

return true if the canvas is mirrored, false otherwise.

Krita 4.0.0

reset the canvas rotation.

Krita 4.0.0

set the zoomlevel to 100%

rotation()float
Krita 4.0.0

Return

the rotation of the canvas in degrees.

setLevelOfDetailMode(enable: bool)
Krita 4.0.0

sets Instant Preview to enable

Parameters

enable

(no description provided)

setMirror(value: bool)
Krita 4.0.0

turn the canvas mirroring on or off depending on value

Parameters

value

(no description provided)

setRotation(angle: float)
Krita 4.0.0

set the rotation of the canvas to the given angle in degrees.

Parameters

angle

(no description provided)

setWrapAroundMode(enable: bool)
Krita 4.0.0

set wraparound mode to enable

Parameters

enable

(no description provided)

setZoomLevel(value: float)
Krita 4.0.0Krita 4.2.0

set the zoomlevel to the given value. 1.0 is 100%.

Parameters

value(no description provided)
view()View
Krita 4.0.0

Return

the view that holds this canvas

wrapAroundMode()bool
Krita 4.0.0

Return

true if the canvas is in wraparound mode, false if not. Only when OpenGL is enabled, is wraparound mode available.

zoomLevel()float
Krita 4.0.0

Return

the current zoomlevel. 1.0 is 100%.