It's probably too late in the process for this, but you should know that
the Perl-only GUI toolkit Prima---which is amazing!---has very similar
primitives under the Prima::Drawable interface. I would encourage you to
look for ways to interact with Prima. One way would be to make your
interface align with Prima's in a duck-typed way so that the same sequence
of methods could be called on a Prima Drawable or one of your plotter
objects.

Dmitry is amazing. If you can find a way to collaborate, it would totally
be worth your time.

David

 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

On Thu, Aug 21, 2025, 8:37 AM Albert Koelmans via module-authors <
module-authors@perl.org> wrote:

> I am planning to contribute a (2D) graphics library for pen plotters. This
> seems to fill a hole in CPAN - I can't find any support for pen plotters
> there.
>
> I want to call this Graphics::Penplotter::GcodeXY, partly because it will
> make it easier for pen plotter users to find it.
>
> Gcode is the command language for pen plotters. This language was
> originally designed for 3D milling machines. Pen plotters use just one
> plane, hence the XY.
>
> Pen plotters need a separate graphics library because pen plotters
> generate line segments rather than pixels. This means that the graphics
> engine is quite different. You don't need Bresenham's algorithm, for
> example.
>
> In its current state, the library offers the following:
> - the usual graphics primitives: line, rectangle, circle, ellipse,
> polygon, arc, arrowhead, bezier curves of any order. Most have variants,
> including rounded corners;
> - transformations (like in Postscript): translate, scale, rotate, skew,
> save and restore graphics state, manipulate the current transformation
> matrix;
> - SVG import and export;
> - design splitting (e.g. split A1 design into four A3 sheets for separate
> plotting);
> - Postscript output (eps);
> - pen movement optimization;
> - interface with the vpype software for lots of advanced algorithms;
> - font support: set font name and size, add font search paths, calculate
> string width;
> - hatching (to simulate filled areas).
>
> To check out the complete perldoc on github:
> https://github.com/gamk67/Graphics-Penplotter-GcodeXY
>
> I would be grateful for any feedback.
>
> Many thanks
> Albert
>
>

Reply via email to