svgen.element.mixins package — docs

Skip to main content
`Ctrl`+`K`

# svgen.element.mixins package

## Module contents

A module implementing svg element mixin classes.

class svgen.element.mixins.FillColorMixin(tag: str = None, text: str = '', attrib: dict[str, str | int | float | bool] | list[Attribute] | Attribute = None, children: list[Element] = None, head_child: Element = None, tail_child: Element = None, allow_no_end_tag: bool = True, class_str: str = None, preformatted: bool = False, **extra)

  Bases: `Element`

  A mixin class for elements with a ‘fill’ color attribute.

  assign_fill_color(data: str | Hsl | Rgb | Color) → None

    Assign a fill color for this instance.

  property fill_color: Color

    Get the fill color for this instance.

  property has_fill_color: bool

    Determine if this instance has a fill color.

class svgen.element.mixins.RadiusXyMixin(rx: float = 0.0, ry: float = 0.0)

  Bases: `object`

  A class mixin for entities with ‘rx’ and ‘ry’ attributes.

  property radius_xy_attributes: Iterator[Attribute]

    Get attributes for this instance.

class svgen.element.mixins.RectangularMixin(rect: Rectangle)

  Bases: `object`

  A class mixin for rectangular entities.

  has_dimensions = True
  property rect_attributes: Iterator[Attribute]

    Get attributes for this instance.