Pin Labels

Base

class pinout.components.pinlabel.Base(content='', x=0, y=0, tag=None, body=None, leaderline=None, **kwargs)

Bases: pinout.core.Group

Label component designed specifically for labelling pins.

Parameters
  • content (str, optional) – Text displayed in label, defaults to “”

  • x (int, optional) – position of label on x-axis , defaults to 0

  • y (int, optional) – position of label on y-axis, defaults to 0

  • tag (str (CSS name compliant), optional) – categorise the label - applied as a CSS class, defaults to None

  • body (dict or pinlabel.Body instance, optional) – replace or configure the default body component, defaults to None

  • leaderline (dict or pinlabel.Leaderline, optional) – replace or configure the default leaderline component, defaults to None

PinLabel

class pinout.components.pinlabel.PinLabel(content='', x=0, y=0, tag=None, body=None, leaderline=None, **kwargs)

Bases: pinout.components.pinlabel.Base

See Base for details of this component.

Body

class pinout.components.pinlabel.Body(x, y, width, height, corner_radius=0, **kwargs)

Bases: pinout.core.SvgShape

Graphical shape that makes up the body of a pinlabel.

Parameters
  • x (int) – position of label on x-axis

  • y (int) – position of label on y-axis

  • width (int) – Width of label body

  • height (int) – Height of label body

  • corner_radius (int, optional) – Corner radius of label body, defaults to 0

Leaderline

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

Bases: pinout.components.leaderline.Curved

Graphical line joining the label origin coordinates to the label body.

Parameters

lline (dict of leaderline attributes or replacement Leaderline instance) – Override configuration or replace the pinlabel’s leaderline.

PinLabelGroup

class pinout.components.pinlabel.PinLabelGroup(x, y, pin_pitch, label_start, label_pitch, labels, leaderline=None, body=None, **kwargs)

Bases: pinout.core.Group

Convenience class to place multiple rows of pin-labels on a pin-header.

This is the recommended method of adding pin labels to a diagram. Locate the PinLabelSet by setting x and y attributes.

Pitch is the distance, in pixels, between each pin of the header. (0, 30) steps 0px right and 30px down for each pin. (30, 0) creates a horizontal header. (-30, 0) creates a horizontal header in the reverse direction. This can be useful for ‘stacking’ rows in reversed order to avoid leader-lines overlapping.

Parameters
  • x (int) – x-coordinate of the first pin in the header

  • y (int) – y-coordinate of the first pin in the header

  • pin_pitch (tuple: (x,y)) – Distance between pins in the header

  • label_start (tuple: (x,y)) – Offset of the first label from the first pin

  • label_pitch (tuple: (x,y)) – Distance between each row of labels

  • labels (List) – Label data

  • leaderline (dict or Leaderline object, optional) – Leaderline customisations, defaults to None

  • body (dict or LabelBody object, optional) – Label body customisations, defaults to None