Skip to content

PythonQt.QtGui.QPainter · declarations 004

Back to PythonQt.QtGui.QPainter

setClipRect

setClipRect(x: Any, y: Any, w: Any, h: Any, op: Any) -> None

X.setClipRect(x, y, w, h, op)

Supplemental documentation: Qt 5 reference:

void QPainter::setClipRect(const QRectF \&rectangle, Qt::ClipOperation operation \= Qt::ReplaceClip)

Enables clipping, and sets the clip region to the given rectangle using the given clip operation. The default operation is to replace the current clip rectangle.

Note that the clip rectangle is specified in logical (painter) coordinates.

See also clipRegion(), setClipping(), and Clipping.

void QPainter::setClipRect(const QRect \&rectangle, Qt::ClipOperation operation \= Qt::ReplaceClip)

This is an overloaded function.

Enables clipping, and sets the clip region to the given rectangle using the given clip operation.

void QPainter::setClipRect(int x, int y, int width, int height, Qt::ClipOperation operation \= Qt::ReplaceClip)

Enables clipping, and sets the clip region to the rectangle beginning at (x, y) with the given width and height.

Upstream PySide2 reference signatures (binding differences may apply):

setClipRect(self, arg__1: PySide2.QtCore.QRect, op: PySide2.QtCore.Qt.ClipOperation=...) -> None
setClipRect(self, arg__1: PySide2.QtCore.QRectF, op: PySide2.QtCore.Qt.ClipOperation=...) -> None
setClipRect(self, x: int, y: int, w: int, h: int, op: PySide2.QtCore.Qt.ClipOperation=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setClipRect

setClipRegion

setClipRegion(arg__1: Any, op: Any) -> None

X.setClipRegion(arg__1, op)

Supplemental documentation: Qt 5 reference:

void QPainter::setClipRegion(const QRegion \&region, Qt::ClipOperation operation \= Qt::ReplaceClip)

Sets the clip region to the given region using the specified clip operation. The default clip operation is to replace the current clip region.

Note that the clip region is given in logical coordinates.

See also clipRegion(), setClipRect(), and Clipping.

Upstream PySide2 reference signatures (binding differences may apply):

setClipRegion(self, arg__1: PySide2.QtGui.QRegion, op: PySide2.QtCore.Qt.ClipOperation=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setClipRegion

setClipping

setClipping(enable: bool) -> None

X.setClipping(enable)

Supplemental documentation: Qt 5 reference:

void QPainter::setClipping(bool enable)

Enables clipping if enable is true, or disables clipping if enable is false.

See also hasClipping() and Clipping.

Upstream PySide2 reference signatures (binding differences may apply):

setClipping(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setClipping

setCompositionMode

setCompositionMode(mode: Any) -> None

X.setCompositionMode(mode)

Supplemental documentation: Qt 5 reference:

void QPainter::setCompositionMode(QPainter::CompositionMode mode)

Sets the composition mode to the given mode.

Warning: Only a QPainter operating on a QImage fully supports all composition modes. The RasterOp modes are supported for X11 as described in compositionMode().

See also compositionMode().

Upstream PySide2 reference signatures (binding differences may apply):

setCompositionMode(self, mode: PySide2.QtGui.QPainter.CompositionMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setCompositionMode

setFont

setFont(f: Any) -> None

X.setFont(f)

Supplemental documentation: Qt 5 reference:

void QPainter::setFont(const QFont \&font)

Sets the painter's font to the given font.

This font is used by subsequent drawText() functions. The text color is the same as the pen color.

If you set a font that isn't available, Qt finds a close match. font() will return what you set using setFont() and fontInfo() returns the font actually being used (which may be the same).

See also font(), drawText(), and Settings.

Upstream PySide2 reference signatures (binding differences may apply):

setFont(self, f: PySide2.QtGui.QFont) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setFont

setLayoutDirection

setLayoutDirection(direction: Any) -> None

X.setLayoutDirection(direction)

Supplemental documentation: Qt 5 reference:

void QPainter::setLayoutDirection(Qt::LayoutDirection direction)

Sets the layout direction used by the painter when drawing text, to the specified direction.

The default is Qt::LayoutDirectionAuto, which will implicitly determine the direction from the text drawn.

See also QTextOption::setTextDirection(), layoutDirection(), drawText(), and Settings.

Upstream PySide2 reference signatures (binding differences may apply):

setLayoutDirection(self, direction: PySide2.QtCore.Qt.LayoutDirection) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setLayoutDirection

setOpacity

setOpacity(opacity: float) -> None

X.setOpacity(opacity)

Supplemental documentation: Qt 5 reference:

void QPainter::setOpacity(qreal opacity)

Sets the opacity of the painter to opacity. The value should be in the range 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.

Opacity set on the painter will apply to all drawing operations individually.

This function was introduced in Qt 4.2.

See also opacity().

Upstream PySide2 reference signatures (binding differences may apply):

setOpacity(self, opacity: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setOpacity

setPen

setPen(style: Any) -> None

X.setPen(style)

Supplemental documentation: Qt 5 reference:

void QPainter::setPen(const QPen \&pen)

Sets the painter's pen to be the given pen.

The pen defines how to draw lines and outlines, and it also defines the text color.

See also pen() and Settings.

void QPainter::setPen(const QColor \&color)

This is an overloaded function.

Sets the painter's pen to have style Qt::SolidLine, width 1 and the specified color.

void QPainter::setPen(Qt::PenStyle style)

This is an overloaded function.

Sets the painter's pen to have the given style, width 1 and black color.

Upstream PySide2 reference signatures (binding differences may apply):

setPen(self, color: PySide2.QtGui.QColor) -> None
setPen(self, pen: PySide2.QtGui.QPen) -> None
setPen(self, style: PySide2.QtCore.Qt.PenStyle) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setPen

setRedirected

setRedirected(device: Any, replacement: Any, offset: Any) -> None

X.setRedirected(device, replacement, offset)

Upstream PySide2 reference signatures (binding differences may apply):

setRedirected(device: PySide2.QtGui.QPaintDevice, replacement: PySide2.QtGui.QPaintDevice, offset: PySide2.QtCore.QPoint=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setRedirected

setRenderHint

setRenderHint(hint: Any, on: bool) -> None

X.setRenderHint(hint, on)

Supplemental documentation: Qt 5 reference:

void QPainter::setRenderHint(QPainter::RenderHint hint, bool on \= true)

Sets the given render hint on the painter if on is true; otherwise clears the render hint.

See also setRenderHints(), renderHints(), and Rendering Quality.

Upstream PySide2 reference signatures (binding differences may apply):

setRenderHint(self, hint: PySide2.QtGui.QPainter.RenderHint, on: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setRenderHint

setRenderHints

setRenderHints(hints: Any, on: bool) -> None

X.setRenderHints(hints, on)

Supplemental documentation: Qt 5 reference:

void QPainter::setRenderHints(QPainter::RenderHints hints, bool on \= true)

Sets the given render hints on the painter if on is true; otherwise clears the render hints.

This function was introduced in Qt 4.2.

See also setRenderHint(), renderHints(), and Rendering Quality.

Upstream PySide2 reference signatures (binding differences may apply):

setRenderHints(self, hints: PySide2.QtGui.QPainter.RenderHints, on: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setRenderHints

setTransform

setTransform(transform: Any, combine: bool) -> None

X.setTransform(transform, combine)

Supplemental documentation: Qt 5 reference:

void QPainter::setTransform(const QTransform \&transform, bool combine \= false)

Sets the world transformation matrix. If combine is true, the specified transform is combined with the current matrix; otherwise it replaces the current matrix.

This function was introduced in Qt 4.3.

See also transform() and setWorldTransform().

Upstream PySide2 reference signatures (binding differences may apply):

setTransform(self, transform: PySide2.QtGui.QTransform, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setTransform

setViewTransformEnabled

setViewTransformEnabled(enable: bool) -> None

X.setViewTransformEnabled(enable)

Supplemental documentation: Qt 5 reference:

void QPainter::setViewTransformEnabled(bool enable)

Enables view transformations if enable is true, or disables view transformations if enable is false.

See also viewTransformEnabled() and Window-Viewport Conversion.

Upstream PySide2 reference signatures (binding differences may apply):

setViewTransformEnabled(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setViewTransformEnabled

setViewport

setViewport(x: Any, y: Any, w: Any, h: Any) -> None

X.setViewport(x, y, w, h)

Supplemental documentation: Qt 5 reference:

void QPainter::setViewport(const QRect \&rectangle)

Sets the painter's viewport rectangle to the given rectangle, and enables view transformations.

The viewport rectangle is part of the view transformation. The viewport specifies the device coordinate system. Its sister, the window(), specifies the logical coordinate system.

The default viewport rectangle is the same as the device's rectangle.

See also viewport(), viewTransformEnabled(), and Window-Viewport Conversion.

void QPainter::setViewport(int x, int y, int width, int height)

This is an overloaded function.

Sets the painter's viewport rectangle to be the rectangle beginning at (x, y) with the given width and height.

Upstream PySide2 reference signatures (binding differences may apply):

setViewport(self, viewport: PySide2.QtCore.QRect) -> None
setViewport(self, x: int, y: int, w: int, h: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setViewport

setWindow

setWindow(x: Any, y: Any, w: Any, h: Any) -> None

X.setWindow(x, y, w, h)

Supplemental documentation: Qt 5 reference:

void QPainter::setWindow(const QRect \&rectangle)

Sets the painter's window to the given rectangle, and enables view transformations.

The window rectangle is part of the view transformation. The window specifies the logical coordinate system. Its sister, the viewport(), specifies the device coordinate system.

The default window rectangle is the same as the device's rectangle.

See also window(), viewTransformEnabled(), and Window-Viewport Conversion.

void QPainter::setWindow(int x, int y, int width, int height)

This is an overloaded function.

Sets the painter's window to the rectangle beginning at (x, y) and the given width and height.

Upstream PySide2 reference signatures (binding differences may apply):

setWindow(self, window: PySide2.QtCore.QRect) -> None
setWindow(self, x: int, y: int, w: int, h: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setWindow

setWorldMatrix

setWorldMatrix(matrix: Any, combine: bool) -> None

X.setWorldMatrix(matrix, combine)

Upstream PySide2 reference signatures (binding differences may apply):

setWorldMatrix(self, matrix: PySide2.QtGui.QMatrix, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setWorldMatrix

setWorldMatrixEnabled

setWorldMatrixEnabled(enabled: bool) -> None

X.setWorldMatrixEnabled(enabled)

Supplemental documentation: Qt 5 reference:

void QPainter::setWorldMatrixEnabled(bool enable)

Enables transformations if enable is true, or disables transformations if enable is false. The world transformation matrix is not changed.

This function was introduced in Qt 4.2.

See also worldMatrixEnabled(), worldTransform(), and Coordinate Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

setWorldMatrixEnabled(self, enabled: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setWorldMatrixEnabled

setWorldTransform

setWorldTransform(matrix: Any, combine: bool) -> None

X.setWorldTransform(matrix, combine)

Supplemental documentation: Qt 5 reference:

void QPainter::setWorldTransform(const QTransform \&matrix, bool combine \= false)

Sets the world transformation matrix. If combine is true, the specified matrix is combined with the current matrix; otherwise it replaces the current matrix.

See also worldTransform(), transform(), and setTransform().

Upstream PySide2 reference signatures (binding differences may apply):

setWorldTransform(self, matrix: PySide2.QtGui.QTransform, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#setWorldTransform

shear

shear(sh: float, sv: float) -> None

X.shear(sh, sv)

Supplemental documentation: Qt 5 reference:

void QPainter::shear(qreal sh, qreal sv)

Shears the coordinate system by (sh, sv).

See also setWorldTransform() and Coordinate Transformations.

Upstream PySide2 reference signatures (binding differences may apply):

shear(self, sh: float, sv: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#shear

strokePath

strokePath(path: Any, pen: Any) -> None

X.strokePath(path, pen)

Supplemental documentation: Qt 5 reference:

void QPainter::strokePath(const QPainterPath \&path, const QPen \&pen)

Draws the outline (strokes) the path path with the pen specified by pen

See also fillPath() and Drawing.

Upstream PySide2 reference signatures (binding differences may apply):

strokePath(self, path: PySide2.QtGui.QPainterPath, pen: PySide2.QtGui.QPen) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#strokePath

testRenderHint

testRenderHint(hint: Any) -> bool

X.testRenderHint(hint) -> bool

Supplemental documentation: Qt 5 reference:

bool QPainter::testRenderHint(QPainter::RenderHint hint) const

Returns true if hint is set; otherwise returns false.

This function was introduced in Qt 4.3.

See also renderHints() and setRenderHint().

Upstream PySide2 reference signatures (binding differences may apply):

testRenderHint(self, hint: PySide2.QtGui.QPainter.RenderHint) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#testRenderHint

transform

transform() -> Any

X.transform() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

const QTransform \&QPainter::transform() const

Alias for worldTransform(). Returns the world transformation matrix.

See also setTransform() and worldTransform().

Upstream PySide2 reference signatures (binding differences may apply):

transform(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#transform

translate

translate(dx: Any, dy: Any) -> None

X.translate(dx, dy)

Supplemental documentation: Qt 5 reference:

void QPainter::translate(const QPointF \&offset)

Translates the coordinate system by the given offset; i.e. the given offset is added to points.

See also setWorldTransform() and Coordinate Transformations.

void QPainter::translate(const QPoint \&offset)

This is an overloaded function.

Translates the coordinate system by the given offset.

void QPainter::translate(qreal dx, qreal dy)

This is an overloaded function.

Translates the coordinate system by the vector (dx, dy).

Upstream PySide2 reference signatures (binding differences may apply):

translate(self, dx: float, dy: float) -> None
translate(self, offset: PySide2.QtCore.QPoint) -> None
translate(self, offset: PySide2.QtCore.QPointF) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#translate

viewTransformEnabled

viewTransformEnabled() -> bool

X.viewTransformEnabled() -> bool

Supplemental documentation: Qt 5 reference:

bool QPainter::viewTransformEnabled() const

Returns true if view transformation is enabled; otherwise returns false.

See also setViewTransformEnabled() and worldTransform().

Upstream PySide2 reference signatures (binding differences may apply):

viewTransformEnabled(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#viewTransformEnabled

viewport

viewport() -> Any

X.viewport() -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QPainter::viewport() const

Returns the viewport rectangle.

See also setViewport() and setViewTransformEnabled().

Upstream PySide2 reference signatures (binding differences may apply):

viewport(self) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#viewport

window

window() -> Any

X.window() -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QPainter::window() const

Returns the window rectangle.

See also setWindow() and setViewTransformEnabled().

Upstream PySide2 reference signatures (binding differences may apply):

window(self) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#window

worldMatrix

worldMatrix() -> Any

X.worldMatrix() -> PythonQt.QtGui.QMatrix

Upstream PySide2 reference signatures (binding differences may apply):

worldMatrix(self) -> PySide2.QtGui.QMatrix

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#worldMatrix

worldMatrixEnabled

worldMatrixEnabled() -> bool

X.worldMatrixEnabled() -> bool

Supplemental documentation: Qt 5 reference:

bool QPainter::worldMatrixEnabled() const

Returns true if world transformation is enabled; otherwise returns false.

This function was introduced in Qt 4.2.

See also setWorldMatrixEnabled(), worldTransform(), and Coordinate System.

Upstream PySide2 reference signatures (binding differences may apply):

worldMatrixEnabled(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#worldMatrixEnabled

worldTransform

worldTransform() -> Any

X.worldTransform() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

const QTransform \&QPainter::worldTransform() const

Returns the world transformation matrix.

See also setWorldTransform().

Upstream PySide2 reference signatures (binding differences may apply):

worldTransform(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qpainter.html#worldTransform