Skip to content

PythonQt.QtGui.QPainterPathStroker

QPainterPathStroker

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

By calling the createStroke() function, passing a given QPainterPath as argument, a new painter path representing the outline of the given path is created. The newly created painter path can then be filled to draw the original painter path's outline.

You can control the various design aspects (width, cap styles, join styles and dash pattern) of the outlining using the following functions:

The setDashPattern() function accepts both a Qt::PenStyle object and a vector representation of the pattern as argument.

In addition you can specify a curve's threshold, controlling the granularity with which a curve is drawn, using the setCurveThreshold() function. The default threshold is a well adjusted value (0.25), and normally you should not need to modify it. However, you can make the curve's appearance smoother by decreasing its value.

You can also control the miter limit for the generated outline using the setMiterLimit() function. The miter limit describes how far from each join the miter join can extend. The limit is specified in the units of width so the pixelwise miter limit will be miterlimit * width. This value is only used if the join style is Qt::MiterJoin.

The painter path generated by the createStroke() function should only be used for outlining the given painter path. Otherwise it may cause unexpected behavior. Generated outlines also require the Qt::WindingFill rule which is set by default.

Source: https://doc.qt.io/archives/qt-5.15/qpainterpathstroker.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
capStyle function (self) -> Any Returns the cap style of the generated outlines.
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
createStroke function (self, path: Any) -> Any X.createStroke(path) -> PythonQt.QtGui.QPainterPath
curveThreshold function (self) -> float X.curveThreshold() -> float
dashOffset function (self) -> float X.dashOffset() -> float
dashPattern function (self) -> tuple X.dashPattern() -> tuple
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
joinStyle function (self) -> Any Returns the join style of the generated outlines.
miterLimit function (self) -> float X.miterLimit() -> float
setCapStyle function (self, style: Any) -> None Sets the cap style of the generated outlines to style.
setCurveThreshold function (self, threshold: float) -> None Specifies the curve flattening threshold, controlling the granularity with which the generated outlines' curve is drawn.
setDashOffset function (self, offset: float) -> None Sets the dash offset for the generated outlines to offset.
setDashPattern function (self, arg__1: Any) -> None Sets the dash pattern for the generated outlines to style.
setJoinStyle function (self, style: Any) -> None Sets the join style of the generated outlines to style.
setMiterLimit function (self, length: float) -> None Sets the miter limit of the generated outlines to limit.
setWidth function (self, width: float) -> None Sets the width of the generated outline painter path to width.
width function (self) -> float X.width() -> float