XP is just a number | |
PerlMonks |
GD::Text::Arcby da (Friar) |
on Jan 23, 2004 at 02:10 UTC ( [id://323405]=CUFP: print w/replies, xml ) | Need Help?? |
FreeType fonts can easily be used to draw text at an arbitrary angle, but what do you do if you want to draw
text on a curve? I wrote up a script to do that using
GD and GD::Text; it worked well enough that I turned it into
a module, which I call GD::Text::Arc .
Sample output is here. It works with arbitrary GD graphics objects and TrueType fonts, tries to provide intelligent defaults, and the output doesn't look so bad. This was also my first foray into writing tests while I wrote code; that was just as useful as everyone says it is, so I think I'm a convert. Of course, I'm sure I need way more than 46 tests, but it's an OK first draft. Now that I'm all puffed up with releasing my first CPAN module and stuff, I'd love for people to pick it apart and tell me what I did badly. :-)
Back to
Cool Uses for Perl
|
|