Skip to content

Instantly share code, notes, and snippets.

@iani
Created October 10, 2012 11:23
Show Gist options
  • Save iani/3864913 to your computer and use it in GitHub Desktop.
Save iani/3864913 to your computer and use it in GitHub Desktop.
Testing SuperCollider QPenPrinter stroke width effect, from 0 to 1 in 1000000, 1000, 10000 increments
QPenPrinter.print { | p |
var font;
font = Font.default.size_(6);
Pen.fillColor = Color.black;
(1..100) * 7 do: { | i, j |
j = j / 1000000;
Pen.stringCenteredIn(j.asString, Rect(0, i - 5, 45, 8), font);
Pen.width = j;
Pen.line(50@i, 400@i);
Pen.stroke;
};
p.newPage;
(1..100) * 7 do: { | i, j |
j = j / 1000;
Pen.stringCenteredIn(j.asString, Rect(0, i - 5, 45, 8), font);
Pen.width = j;
Pen.line(50@i, 400@i);
Pen.stroke;
};
p.newPage;
(1..100) * 7 do: { | i, j |
i = i + 50;
j = j / 10000;
Pen.stringCenteredIn(j.asString, Rect(0, i - 5, 45, 8), font);
Pen.width = j;
Pen.line(50@i, 400@i);
Pen.stroke;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment