Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.76 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.76 KB

Robofab Pens

A collection of Robofab pens doing various things with outlines.

stepPen.py

The StepPen is a basic pen not meant to be used in itself, it serves as a basis for subclassing.

Existing implementations:

  • FlattenPen: flatten curves into a series of segment (similar to robofab.pens.filterPen.FlattenPen).
filterPen = stepPen.FlattenPen(otherPen, pace=50)

alt tag

  • SpikePen: Adds spikes to an outline… (similar to robofab.pens.filterPen.spikeGlyph).
filterPen = stepPen.SpikePen(otherPen, pace=50, spikeLength=15)

alt tag

  • JitterPen: flatten curves with added noise.
filterPen = stepPen.JitterPen(otherPen, pace=50, xAmplitude=6, yAmplitude=8)

alt tag

  • DashPen: converts an outline into a succession of independent line segments. They can be perpendicular or tangent to the outline.
filterPen = stepPen.DashPen(otherPen, pace=50, length=25, normal=True)

alt tag

filterPen = stepPen.DashPen(otherPen, pace=50, length=25, normal=False)

alt tag

  • DotPen: converts an outline into a succession of circles.
filterPen = stepPen.DotPen(otherPen, pace=50, radius=15)

alt tag

translationPen.py

This pen allows for the drawing of a translated shape according to defined angle and width/length.

alt tag

cleanPointPen.py

Pen to clean up outlines by filtering out overlapping points and small junk contours (user can define a minimal area to filter small contours out.)