Skip to content

PainterPathStroker

Qt Base Class: QPainterPathStroker

Signature: QPainterPathStroker(self) -> None QPainterPathStroker(self, pen: Union[PySide6.QtGui.QPen, PySide6.QtCore.Qt.PenStyle, PySide6.QtGui.QColor]) -> None

Base classes

Name Children Inherits
QPainterPathStroker
PySide6.QtGui
QPainterPathStroker(self) -> None

⋔ Inheritance diagram

graph TD
  1473245632416["gui.PainterPathStroker"]
  1473300066752["QtGui.QPainterPathStroker"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473300066752 --> 1473245632416
  1473291690208 --> 1473300066752
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QPainterPathStroker

Source code in prettyqt\gui\painterpathstroker.py
class PainterPathStroker(gui.QPainterPathStroker):
    def set_cap_style(self, style: constants.CapStyleStr | constants.PenCapStyle):
        """Set cap style to use.

        Args:
            style: cap style to use
        """
        self.setCapStyle(constants.CAP_STYLE.get_enum_value(style))

    def get_cap_style(self) -> constants.CapStyleStr | constants.PenCapStyle:
        """Return current cap style.

        Returns:
            cap style
        """
        return constants.CAP_STYLE.inverse[self.capStyle()]

    def set_join_style(self, style: constants.JoinStyleStr | constants.PenJoinStyle):
        """Set join style to use.

        Args:
            style: join style to use
        """
        self.setJoinStyle(constants.JOIN_STYLE.get_enum_value(style))

    def get_join_style(self) -> constants.JoinStyleStr:
        """Return current join style.

        Returns:
            join style
        """
        return constants.JOIN_STYLE.inverse[self.joinStyle()]

    def create_stroke(self, path: gui.QPainterPath) -> gui.PainterPath:
        return gui.PainterPath(self.createStroke(path))

get_cap_style() -> constants.CapStyleStr | constants.PenCapStyle

Return current cap style.

Source code in prettyqt\gui\painterpathstroker.py
def get_cap_style(self) -> constants.CapStyleStr | constants.PenCapStyle:
    """Return current cap style.

    Returns:
        cap style
    """
    return constants.CAP_STYLE.inverse[self.capStyle()]

get_join_style() -> constants.JoinStyleStr

Return current join style.

Source code in prettyqt\gui\painterpathstroker.py
def get_join_style(self) -> constants.JoinStyleStr:
    """Return current join style.

    Returns:
        join style
    """
    return constants.JOIN_STYLE.inverse[self.joinStyle()]

set_cap_style(style: constants.CapStyleStr | constants.PenCapStyle)

Set cap style to use.

Parameters:

Name Type Description Default
style CapStyleStr | PenCapStyle

cap style to use

required
Source code in prettyqt\gui\painterpathstroker.py
def set_cap_style(self, style: constants.CapStyleStr | constants.PenCapStyle):
    """Set cap style to use.

    Args:
        style: cap style to use
    """
    self.setCapStyle(constants.CAP_STYLE.get_enum_value(style))

set_join_style(style: constants.JoinStyleStr | constants.PenJoinStyle)

Set join style to use.

Parameters:

Name Type Description Default
style JoinStyleStr | PenJoinStyle

join style to use

required
Source code in prettyqt\gui\painterpathstroker.py
def set_join_style(self, style: constants.JoinStyleStr | constants.PenJoinStyle):
    """Set join style to use.

    Args:
        style: join style to use
    """
    self.setJoinStyle(constants.JOIN_STYLE.get_enum_value(style))