NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

pixie.distraction()

Syntax

distraction(d=0.05)

Description

Determine how many writing errors Pixie makes. Distraction d ranges between 0.0 and 1.0, setting how often mistake() is called from paragraph(). The more distracted Pixie gets, the more words will be scribbled through. Making mistakes is a recursive process: corrections of mistakes might become mistakes themselves, and so on. Setting a high distraction on a long paragraph may take a while to draw.

Example

pixie = ximport("pixie")
txt  = "Pixie was originally a part of the Aunt Hillary code package,"
txt += "a handwriting that looks different each time, contains mistakes,"
txt += "has wobbly baselines and variable color pressure."
pixie.keywords(["pixie", "aunt hillary"])
pixie.distraction(0.8)
pixie.paragraph(txt, 100, 100, 200, pt=15)