Skip to content

loicsander/RobofabPens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.)

About

A collection of Robofab pens doing various things with outlines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages