PythonQt.QtGui.QPainterPath · declarations 001
Back to PythonQt.QtGui.QPainterPath
CurveToDataElement
instance-attribute
CurveToDataElement: Any
CurveToElement
instance-attribute
CurveToElement: Any
Element
instance-attribute
Element: type
PythonQtInstanceWrapper object
ElementType
instance-attribute
ElementType: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
LineToElement
instance-attribute
LineToElement: Any
MoveToElement
instance-attribute
MoveToElement: Any
addEllipse
addEllipse(x: Any, y: Any, w: Any, h: Any) -> None
X.addEllipse(x, y, w, h)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addEllipse(const QRectF \&boundingRectangle)
Creates an ellipse within the specified boundingRectangle and adds it to the painter path as a closed subpath.
The ellipse is composed of a clockwise curve, starting and finishing at zero degrees (the 3 o'clock position).
QLinearGradient myGradient; QPen myPen; QRectF boundingRectangle; QPainterPath myPath; myPath.addEllipse(boundingRectangle); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also arcTo(), QPainter::drawEllipse(), and Composing a QPainterPath.
void QPainterPath::addEllipse(qreal x, qreal y, qreal width, qreal height)
This is an overloaded function.
Creates an ellipse within the bounding rectangle defined by its top-left corner at (x, y), width and height, and adds it to the painter path as a closed subpath.
void QPainterPath::addEllipse(const QPointF \¢er, qreal rx, qreal ry)
This is an overloaded function.
Creates an ellipse positioned at center with radii rx and ry, and adds it to the painter path as a closed subpath.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
addEllipse(self, center: PySide2.QtCore.QPointF, rx: float, ry: float) -> None
addEllipse(self, rect: PySide2.QtCore.QRectF) -> None
addEllipse(self, x: float, y: float, w: float, h: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addEllipse
addPath
addPath(path: Any) -> None
X.addPath(path)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addPath(const QPainterPath \&path)
Adds the given path to this path as a closed subpath.
See also connectPath() and Composing a QPainterPath.
Upstream PySide2 reference signatures (binding differences may apply):
addPath(self, path: PySide2.QtGui.QPainterPath) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addPath
addPolygon
addPolygon(polygon: Any) -> None
X.addPolygon(polygon)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addPolygon(const QPolygonF \&polygon)
Adds the given polygon to the path as an (unclosed) subpath.
Note that the current position after the polygon has been added, is the last point in polygon. To draw a line back to the first point, use the closeSubpath() function.
QLinearGradient myGradient; QPen myPen; QPolygonF myPolygon; QPainterPath myPath; myPath.addPolygon(myPolygon); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also lineTo() and Composing a QPainterPath.
Upstream PySide2 reference signatures (binding differences may apply):
addPolygon(self, polygon: PySide2.QtGui.QPolygonF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addPolygon
addRect
addRect(x: Any, y: Any, w: Any, h: Any) -> None
X.addRect(x, y, w, h)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addRect(const QRectF \&rectangle)
Adds the given rectangle to this path as a closed subpath.
The rectangle is added as a clockwise set of lines. The painter path's current position after the rectangle has been added is at the top-left corner of the rectangle.
QLinearGradient myGradient; QPen myPen; QRectF myRectangle; QPainterPath myPath; myPath.addRect(myRectangle); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also addRegion(), lineTo(), and Composing a QPainterPath.
void QPainterPath::addRect(qreal x, qreal y, qreal width, qreal height)
This is an overloaded function.
Adds a rectangle at position (x, y), with the given width and height, as a closed subpath.
Upstream PySide2 reference signatures (binding differences may apply):
addRect(self, rect: PySide2.QtCore.QRectF) -> None
addRect(self, x: float, y: float, w: float, h: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addRect
addRegion
addRegion(region: Any) -> None
X.addRegion(region)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addRegion(const QRegion \®ion)
Adds the given region to the path by adding each rectangle in the region as a separate closed subpath.
See also addRect() and Composing a QPainterPath.
Upstream PySide2 reference signatures (binding differences may apply):
addRegion(self, region: PySide2.QtGui.QRegion) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addRegion
addRoundRect
addRoundRect(x: Any, y: Any, w: Any, h: Any, xRnd: Any, yRnd: Any) -> None
X.addRoundRect(x, y, w, h, xRnd, yRnd)
Upstream PySide2 reference signatures (binding differences may apply):
addRoundRect(self, rect: PySide2.QtCore.QRectF, roundness: int) -> None
addRoundRect(self, rect: PySide2.QtCore.QRectF, xRnd: int, yRnd: int) -> None
addRoundRect(self, x: float, y: float, w: float, h: float, roundness: int) -> None
addRoundRect(self, x: float, y: float, w: float, h: float, xRnd: int, yRnd: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addRoundRect
addRoundedRect
addRoundedRect(x: Any, y: Any, w: Any, h: Any, xRadius: float, yRadius: float, mode: Any) -> None
X.addRoundedRect(x, y, w, h, xRadius, yRadius, mode)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addRoundedRect(const QRectF \&rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode \= Qt::AbsoluteSize)
Adds the given rectangle rect with rounded corners to the path.
The xRadius and yRadius arguments specify the radii of the ellipses defining the corners of the rounded rectangle. When mode is Qt::RelativeSize, xRadius and yRadius are specified in percentage of half the rectangle's width and height respectively, and should be in the range 0.0 to 100.0.
This function was introduced in Qt 4.4.
See also addRect().
void QPainterPath::addRoundedRect(qreal x, qreal y, qreal w, qreal h, qreal xRadius, qreal yRadius, Qt::SizeMode mode \= Qt::AbsoluteSize)
This is an overloaded function.
Adds the given rectangle x, y, w, h with rounded corners to the path.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
addRoundedRect(self, rect: PySide2.QtCore.QRectF, xRadius: float, yRadius: float, mode: PySide2.QtCore.Qt.SizeMode=...) -> None
addRoundedRect(self, x: float, y: float, w: float, h: float, xRadius: float, yRadius: float, mode: PySide2.QtCore.Qt.SizeMode=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addRoundedRect
addText
addText(x: Any, y: Any, f: Any, text: str) -> None
X.addText(x, y, f, text)
Supplemental documentation: Qt 5 reference:
void QPainterPath::addText(const QPointF \&point, const QFont \&font, const QString \&text)
Adds the given text to this path as a set of closed subpaths created from the font supplied. The subpaths are positioned so that the left end of the text's baseline lies at the specified point.
QLinearGradient myGradient; QPen myPen; QFont myFont; QPointF baseline(x, y); QPainterPath myPath; myPath.addText(baseline, myFont, tr("Qt")); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also QPainter::drawText() and Composing a QPainterPath.
void QPainterPath::addText(qreal x, qreal y, const QFont \&font, const QString \&text)
This is an overloaded function.
Adds the given text to this path as a set of closed subpaths created from the font supplied. The subpaths are positioned so that the left end of the text's baseline lies at the point specified by (x, y).
Upstream PySide2 reference signatures (binding differences may apply):
addText(self, point: PySide2.QtCore.QPointF, f: PySide2.QtGui.QFont, text: str) -> None
addText(self, x: float, y: float, f: PySide2.QtGui.QFont, text: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#addText
angleAtPercent
angleAtPercent(t: float) -> float
X.angleAtPercent(t) -> float
Supplemental documentation: Qt 5 reference:
qreal QPainterPath::angleAtPercent(qreal t) const
Returns the angle of the path tangent at the percentage t. The argument t has to be between 0 and 1.
Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.
Note that similarly to the other percent methods, the percentage measurement is not linear with regards to the length if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.
Upstream PySide2 reference signatures (binding differences may apply):
angleAtPercent(self, t: float) -> float
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#angleAtPercent
arcMoveTo
arcMoveTo(x: Any, y: Any, w: Any, h: Any, angle: float) -> None
X.arcMoveTo(x, y, w, h, angle)
Supplemental documentation: Qt 5 reference:
void QPainterPath::arcMoveTo(const QRectF \&rectangle, qreal angle)
Creates a move to that lies on the arc that occupies the given rectangle at angle.
Angles are specified in degrees. Clockwise arcs can be specified using negative angles.
This function was introduced in Qt 4.2.
See also moveTo() and arcTo().
void QPainterPath::arcMoveTo(qreal x, qreal y, qreal width, qreal height, qreal angle)
This is an overloaded function.
Creates a move to that lies on the arc that occupies the QRectF(x, y, width, height) at angle.
This function was introduced in Qt 4.2.
Upstream PySide2 reference signatures (binding differences may apply):
arcMoveTo(self, rect: PySide2.QtCore.QRectF, angle: float) -> None
arcMoveTo(self, x: float, y: float, w: float, h: float, angle: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#arcMoveTo
arcTo
arcTo(x: Any, y: Any, w: Any, h: Any, startAngle: float, arcLength: float) -> None
X.arcTo(x, y, w, h, startAngle, arcLength)
Supplemental documentation: Qt 5 reference:
void QPainterPath::arcTo(const QRectF \&rectangle, qreal startAngle, qreal sweepLength)
Creates an arc that occupies the given rectangle, beginning at the specified startAngle and extending sweepLength degrees counter-clockwise.
Angles are specified in degrees. Clockwise arcs can be specified using negative angles.
Note that this function connects the starting point of the arc to the current position if they are not already connected. After the arc has been added, the current position is the last point in arc. To draw a line back to the first point, use the closeSubpath() function.
QLinearGradient myGradient; QPen myPen; QPointF center, startPoint; QPainterPath myPath; myPath.moveTo(center); myPath.arcTo(boundingRect, startAngle, sweepLength); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also arcMoveTo(), addEllipse(), QPainter::drawArc(), QPainter::drawPie(), and Composing a QPainterPath.
void QPainterPath::arcTo(qreal x, qreal y, qreal width, qreal height, qreal startAngle, qreal sweepLength)
This is an overloaded function.
Creates an arc that occupies the rectangle QRectF(x, y, width, height), beginning at the specified startAngle and extending sweepLength degrees counter-clockwise.
Upstream PySide2 reference signatures (binding differences may apply):
arcTo(self, rect: PySide2.QtCore.QRectF, startAngle: float, arcLength: float) -> None
arcTo(self, x: float, y: float, w: float, h: float, startAngle: float, arcLength: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#arcTo
boundingRect
boundingRect() -> Any
X.boundingRect() -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QPainterPath::boundingRect() const
Returns the bounding rectangle of this painter path as a rectangle with floating point precision.
See also controlPointRect().
Upstream PySide2 reference signatures (binding differences may apply):
boundingRect(self) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#boundingRect
closeSubpath
closeSubpath() -> None
X.closeSubpath()
Supplemental documentation: Qt 5 reference:
void QPainterPath::closeSubpath()
Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. The current point of the new path is (0, 0).
If the subpath does not contain any elements, this function does nothing.
See also moveTo() and Composing a QPainterPath.
Upstream PySide2 reference signatures (binding differences may apply):
closeSubpath(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#closeSubpath
connectPath
connectPath(path: Any) -> None
X.connectPath(path)
Supplemental documentation: Qt 5 reference:
void QPainterPath::connectPath(const QPainterPath \&path)
Connects the given path to this path by adding a line from the last element of this path to the first element of the given path.
See also addPath() and Composing a QPainterPath.
Upstream PySide2 reference signatures (binding differences may apply):
connectPath(self, path: PySide2.QtGui.QPainterPath) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#connectPath
contains
contains(p: Any) -> bool
X.contains(p) -> bool
Supplemental documentation: Qt 5 reference:
bool QPainterPath::contains(const QPointF \&point) const
Returns true if the given point is inside the path, otherwise returns false.
See also intersects().
bool QPainterPath::contains(const QRectF \&rectangle) const
Returns true if the given rectangle is inside the path, otherwise returns false.
bool QPainterPath::contains(const QPainterPath \&p) const
Returns true if the given path p is contained within the current path. Returns
false if any edges of the current path and p intersect.
Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed.
This function was introduced in Qt 4.3.
See also intersects().
Upstream PySide2 reference signatures (binding differences may apply):
contains(self, p: PySide2.QtGui.QPainterPath) -> bool
contains(self, pt: PySide2.QtCore.QPointF) -> bool
contains(self, rect: PySide2.QtCore.QRectF) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#contains
controlPointRect
controlPointRect() -> Any
X.controlPointRect() -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QPainterPath::controlPointRect() const
Returns the rectangle containing all the points and control points in this path.
This function is significantly faster to compute than the exact boundingRect(), and the returned rectangle is always a superset of the rectangle returned by boundingRect().
See also boundingRect().
Upstream PySide2 reference signatures (binding differences may apply):
controlPointRect(self) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#controlPointRect
cubicTo
cubicTo(ctrlPt1x: Any, ctrlPt1y: Any, ctrlPt2x: Any, ctrlPt2y: Any, endPtx: Any, endPty: Any) -> None
X.cubicTo(ctrlPt1x, ctrlPt1y, ctrlPt2x, ctrlPt2y, endPtx, endPty)
Supplemental documentation: Qt 5 reference:
void QPainterPath::cubicTo(const QPointF \&c1, const QPointF \&c2, const QPointF \&endPoint)
Adds a cubic Bezier curve between the current position and the given endPoint using the control points specified by c1, and c2.
After the curve is added, the current position is updated to be at the end point of the curve.
QLinearGradient myGradient; QPen myPen; QPainterPath myPath; myPath.cubicTo(c1, c2, endPoint); QPainter painter(this); painter.setBrush(myGradient); painter.setPen(myPen); painter.drawPath(myPath); |
|
|---|---|
See also quadTo() and Composing a QPainterPath.
void QPainterPath::cubicTo(qreal c1X, qreal c1Y, qreal c2X, qreal c2Y, qreal endPointX, qreal endPointY)
This is an overloaded function.
Adds a cubic Bezier curve between the current position and the end point (endPointX, endPointY) with control points specified by (c1X, c1Y) and (c2X, c2Y).
Upstream PySide2 reference signatures (binding differences may apply):
cubicTo(self, ctrlPt1: PySide2.QtCore.QPointF, ctrlPt2: PySide2.QtCore.QPointF, endPt: PySide2.QtCore.QPointF) -> None
cubicTo(self, ctrlPt1x: float, ctrlPt1y: float, ctrlPt2x: float, ctrlPt2y: float, endPtx: float, endPty: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#cubicTo
currentPosition
currentPosition() -> Any
X.currentPosition() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QPainterPath::currentPosition() const
Returns the current position of the path.
Upstream PySide2 reference signatures (binding differences may apply):
currentPosition(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#currentPosition
elementAt
elementAt(i: int) -> Any
X.elementAt(i) -> PythonQt.QtGui.QPainterPath::Element
Supplemental documentation: Qt 5 reference:
QPainterPath::Element QPainterPath::elementAt(int index) const
Returns the element at the given index in the painter path.
See also ElementType, elementCount(), and isEmpty().
Upstream PySide2 reference signatures (binding differences may apply):
elementAt(self, i: int) -> PySide2.QtGui.QPainterPath.Element
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#elementAt
elementCount
elementCount() -> int
X.elementCount() -> int
Supplemental documentation: Qt 5 reference:
int QPainterPath::elementCount() const
Returns the number of path elements in the painter path.
See also ElementType, elementAt(), and isEmpty().
Upstream PySide2 reference signatures (binding differences may apply):
elementCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#elementCount
fillRule
fillRule() -> Any
X.fillRule()
Supplemental documentation: Qt 5 reference:
Qt::FillRule QPainterPath::fillRule() const
Returns the painter path's currently set fill rule.
See also setFillRule().
Upstream PySide2 reference signatures (binding differences may apply):
fillRule(self) -> PySide2.QtCore.Qt.FillRule
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#fillRule
intersected
intersected(r: Any) -> Any
X.intersected(r) -> PythonQt.QtGui.QPainterPath
Supplemental documentation: Qt 5 reference:
QPainterPath QPainterPath::intersected(const QPainterPath \&p) const
Returns a path which is the intersection of this path's fill area and p's fill area. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.
This function was introduced in Qt 4.3.
Upstream PySide2 reference signatures (binding differences may apply):
intersected(self, r: PySide2.QtGui.QPainterPath) -> PySide2.QtGui.QPainterPath
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#intersected
intersects
intersects(p: Any) -> bool
X.intersects(p) -> bool
Supplemental documentation: Qt 5 reference:
bool QPainterPath::intersects(const QRectF \&rectangle) const
Returns true if any point in the given rectangle intersects the path; otherwise
returns false.
There is an intersection if any of the lines making up the rectangle crosses a part of the path or if any part of the rectangle overlaps with any area enclosed by the path. This function respects the current fillRule to determine what is considered inside the path.
See also contains().
bool QPainterPath::intersects(const QPainterPath \&p) const
Returns true if the current path intersects at any point the given path p. Also
returns true if the current path contains or is contained by any part of p.
Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed.
This function was introduced in Qt 4.3.
See also contains().
Upstream PySide2 reference signatures (binding differences may apply):
intersects(self, p: PySide2.QtGui.QPainterPath) -> bool
intersects(self, rect: PySide2.QtCore.QRectF) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#intersects
isEmpty
isEmpty() -> bool
X.isEmpty() -> bool
Supplemental documentation: Qt 5 reference:
bool QPainterPath::isEmpty() const
Returns true if either there are no elements in this path, or if the only element is a
MoveToElement;
otherwise returns false.
See also elementCount().
Upstream PySide2 reference signatures (binding differences may apply):
isEmpty(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#isEmpty
length
length() -> float
X.length() -> float
Supplemental documentation: Qt 5 reference:
qreal QPainterPath::length() const
Returns the length of the current path.
Upstream PySide2 reference signatures (binding differences may apply):
length(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#length
lineTo
lineTo(x: Any, y: Any) -> None
X.lineTo(x, y)
Supplemental documentation: Qt 5 reference:
void QPainterPath::lineTo(const QPointF \&endPoint)
Adds a straight line from the current position to the given endPoint. After the line is drawn, the current position is updated to be at the end point of the line.
See also addPolygon(), addRect(), and Composing a QPainterPath.
void QPainterPath::lineTo(qreal x, qreal y)
This is an overloaded function.
Draws a line from the current position to the point (x, y).
Upstream PySide2 reference signatures (binding differences may apply):
lineTo(self, p: PySide2.QtCore.QPointF) -> None
lineTo(self, x: float, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#lineTo
moveTo
moveTo(x: Any, y: Any) -> None
X.moveTo(x, y)
Supplemental documentation: Qt 5 reference:
void QPainterPath::moveTo(const QPointF \&point)
Moves the current point to the given point, implicitly starting a new subpath and closing the previous one.
See also closeSubpath() and Composing a QPainterPath.
void QPainterPath::moveTo(qreal x, qreal y)
This is an overloaded function.
Moves the current position to (x, y) and starts a new subpath, implicitly closing the previous path.
Upstream PySide2 reference signatures (binding differences may apply):
moveTo(self, p: PySide2.QtCore.QPointF) -> None
moveTo(self, x: float, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#moveTo
percentAtLength
percentAtLength(t: float) -> float
X.percentAtLength(t) -> float
Supplemental documentation: Qt 5 reference:
qreal QPainterPath::percentAtLength(qreal len) const
Returns percentage of the whole path at the specified length len.
Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.
Upstream PySide2 reference signatures (binding differences may apply):
percentAtLength(self, t: float) -> float
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#percentAtLength
pointAtPercent
pointAtPercent(t: float) -> Any
X.pointAtPercent(t) -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QPainterPath::pointAtPercent(qreal t) const
Returns the point at at the percentage t of the current path. The argument t has to be between 0 and 1.
Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.
Upstream PySide2 reference signatures (binding differences may apply):
pointAtPercent(self, t: float) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#pointAtPercent
quadTo
quadTo(ctrlPtx: Any, ctrlPty: Any, endPtx: Any, endPty: Any) -> None
X.quadTo(ctrlPtx, ctrlPty, endPtx, endPty)
Supplemental documentation: Qt 5 reference:
void QPainterPath::quadTo(const QPointF \&c, const QPointF \&endPoint)
Adds a quadratic Bezier curve between the current position and the given endPoint with the control point specified by c.
After the curve is added, the current point is updated to be at the end point of the curve.
See also cubicTo() and Composing a QPainterPath.
void QPainterPath::quadTo(qreal cx, qreal cy, qreal endPointX, qreal endPointY)
This is an overloaded function.
Adds a quadratic Bezier curve between the current point and the endpoint (endPointX, endPointY) with the control point specified by (cx, cy).
Upstream PySide2 reference signatures (binding differences may apply):
quadTo(self, ctrlPt: PySide2.QtCore.QPointF, endPt: PySide2.QtCore.QPointF) -> None
quadTo(self, ctrlPtx: float, ctrlPty: float, endPtx: float, endPty: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#quadTo
setElementPositionAt
setElementPositionAt(i: int, x: float, y: float) -> None
X.setElementPositionAt(i, x, y)
Supplemental documentation: Qt 5 reference:
void QPainterPath::setElementPositionAt(int index, qreal x, qreal y)
Sets the x and y coordinate of the element at index index to x and y.
This function was introduced in Qt 4.2.
Upstream PySide2 reference signatures (binding differences may apply):
setElementPositionAt(self, i: int, x: float, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#setElementPositionAt
setFillRule
setFillRule(fillRule: Any) -> None
X.setFillRule(fillRule)
Supplemental documentation: Qt 5 reference:
void QPainterPath::setFillRule(Qt::FillRule fillRule)
Sets the fill rule of the painter path to the given fillRule. Qt provides two methods for filling paths:
| Qt::OddEvenFill (default) | Qt::WindingFill |
|---|---|
See also fillRule().
Upstream PySide2 reference signatures (binding differences may apply):
setFillRule(self, fillRule: PySide2.QtCore.Qt.FillRule) -> None
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#setFillRule
simplified
simplified() -> Any
X.simplified() -> PythonQt.QtGui.QPainterPath
Supplemental documentation: Qt 5 reference:
QPainterPath QPainterPath::simplified() const
Returns a simplified version of this path. This implies merging all subpaths that intersect, and returning a path containing no intersecting edges. Consecutive parallel lines will also be merged. The simplified path will always use the default fill rule, Qt::OddEvenFill. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
simplified(self) -> PySide2.QtGui.QPainterPath
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#simplified
slopeAtPercent
slopeAtPercent(t: float) -> float
X.slopeAtPercent(t) -> float
Supplemental documentation: Qt 5 reference:
qreal QPainterPath::slopeAtPercent(qreal t) const
Returns the slope of the path at the percentage t. The argument t has to be between 0 and 1.
Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.
Upstream PySide2 reference signatures (binding differences may apply):
slopeAtPercent(self, t: float) -> float
Source: https://doc.qt.io/archives/qt-5.15/qpainterpath.html#slopeAtPercent