brown.core.pen

classes

Class for a generic drawing pen controlling fill patterns.

Currently only solid colors are supported.

__init__ (self, color='#000000', thickness=None, pattern=PenPattern.SOLID, join_style=PenJoinStyle.BEVEL, cap_style=PenCapStyle.SQUARE) permalink view source

arguments:

color (Color or init tuple): The stroke color

thickness (Unit): The stroke thickness. A value of 0 indicates Args cosmetic pixel width. Defaults to constants.DEFAULT_PEN_THICKNESS.

pattern (PenPattern): The stroke pattern. Defaults to a solid line.

join_style (PenJoinStyle): Defaults to a bevel join

cap_style (PenCapStyle): Defaults to a square cap

properties

color: Color The color for the pen permalink view source

thickness: Unit The stroke thickness. permalink view source

pattern: PenPattern The stroke pattern. permalink view source

join_style: PenJoinStyle the style of line sharp line joins. permalink view source

This style has no effect on curved paths.

cap_style: PenCapStyle the style of unclosed path caps with this pen. permalink view source

This style has no effect on closed paths.

class methods

from_existing (pen) permalink view source

Clone a pen.

arguments:

pen (Pen): An existing pen.

inherited from Pen