pythagoras.style.opacity module

class pythagoras.style.opacity.FillOpacity(opacity: float)[source]

Bases: POProperty

Opacity applied only to the fill of an element.

Variables:

opacity (float) – Fill opacity between 0 and 1.

opacity: float
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.opacity.Opacity(opacity: float)[source]

Bases: POProperty

Global opacity for an element.

Variables:

opacity (float) – Opacity value between 0 (transparent) and 1 (opaque).

opacity: float
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.opacity.StrokeOpacity(opacity: float)[source]

Bases: POProperty

Opacity applied only to the stroke (outline) of an element.

Variables:

opacity (float) – Stroke opacity between 0 and 1.

opacity: float
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.