Open hankivy opened 5 years ago
General graphics (line and fill) are a major undertaking to add your own. You might be better off just giving access to current page dimensions and position, and the $text and $grfx objects, and let the end-user do as they please. Of course, this means leaving the environment of the text markup file and allowing access into Perl. Otherwise, you will need to provide wrappers for lots of calls. Utilities such as horizontal and vertical rules might be good to provide.
I am working on a new image format support for SVG, which might be easier for your users to make use of. They could provide SVG code as a text block, and you could wrap some boilerplate around it and pass it on to the SVG image routine (which could also accept an external file, like other image formats). Still, it is a programming language that your users would have to be careful to use properly.
Graphics methods are not supported. See the methods in PDF::API2::Content in CPAN.