Annotations

Annotation

class pinout.components.annotation.AnnotationLabel(content=None, body=None, leaderline=None, target=None, **kwargs)

Bases: pinout.core.Group

Annotation style label.

An alternative method to ‘label’ a diagram, suitable for highlighting hardware details.

It is likely the body, leaderline, and target will all require customisation to best suit specific usages. Several methods of customisation are possible:

diagram-wide customisations:

  • Over-ride dictionary settings in pinout.config.annotation

  • Over-ride default annotation body, leaderline, and target classes

instance specific customisations:

  • Supply a dictionary of arguments to body, content, leaderline, and target attributes. These override config.annotation settings

  • provide an alternative component instance to body, content, leaderline, and target attributes.

Parameters
  • content ([type]) – [description]

  • body ([type], optional) – [description], defaults to None

  • leaderline ([type], optional) – [description], defaults to None

  • target ([type], optional) – [description], defaults to None

Body

class pinout.components.annotation.Body(*args, corner_radius=0, **kwargs)

Bases: pinout.core.Rect

Content

class pinout.components.annotation.Content(content, line_height=None, **kwargs)

Bases: pinout.components.text.TextBlock

Content can be provided as a string, list, dictionary, or component instance. Strings are presented as a single line. Entries of a list present as lines of text. If a dictionary is provided it updates the default config settings and expects the ‘content’ attribute to be a list.

Leaderline

class pinout.components.annotation.Leaderline(direction='hh', **kwargs)

Bases: pinout.components.leaderline.Curved

Target

class pinout.components.annotation.Target(*args, corner_radius=0, **kwargs)

Bases: pinout.core.Rect