pythagoras.style.draw module

class pythagoras.style.draw.Fill(color: Color | None)[source]

Bases: POProperty

Fill style for shapes.

Variables:

color (pythagoras.style.color.Color | None) – Fill color. If None, the shape is not filled.

color: Color | None
svg() str[source]

Compiles the property into SVG syntax.

Returns:

The corresponding SVG property.

tikz() str[source]

Compiles the property into TikZ syntax.

Returns:

The corresponding TikZ property.

class pythagoras.style.draw.LineWidth(width: float, unit: str | None = 'pt')[source]

Bases: POProperty

Line width specification for strokes.

Variables:
  • width (float) – Line width magnitude.

  • unit (str | None) – Unit for the width (default: ‘pt’).

svg() str[source]

Compiles the property into SVG syntax.

Returns:

The corresponding SVG property.

tikz() str[source]

Compiles the property into TikZ syntax.

Returns:

The corresponding TikZ property.

unit: str | None = 'pt'
width: float
class pythagoras.style.draw.Stroke(color: Color | None)[source]

Bases: POProperty

Stroke (outline) style for shapes.

Variables:

color (pythagoras.style.color.Color | None) – Stroke color. If None, no stroke is drawn.

color: Color | None
svg() str[source]

Compiles the property into SVG syntax.

Returns:

The corresponding SVG property.

tikz() str[source]

Compiles the property into TikZ syntax.

Returns:

The corresponding TikZ property.