Class Canvas
Build from Canvas.h
+Krita 4.0.0↻Krita 6.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 pan(offset: QPoint) preferredCenter() ➞ QPointF resetRotation() resetZoom() rotation() ➞ float setLevelOfDetailMode(enable: bool) setMirror(value: bool) setPreferredCenter(imagePos: QPointF) 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.

pan(offset: QPoint)
+Krita 6.0.0

the current view in pixels.

Parameters

offset(no description provided)
preferredCenter() ➞ QPointF
+Krita 6.0.0

\return the position of the image pixel that is placed in the center of the current view

Return

(no description provided)

+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)

setPreferredCenter(imagePos: QPointF)
+Krita 6.0.0

setPan Centers the image pixel at \p imagePos in the current view

Parameters

imagePos(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.0↻Krita 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%.