Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for different renderers #22

Open
benoitkugler opened this issue Dec 7, 2020 · 0 comments
Open

Add support for different renderers #22

benoitkugler opened this issue Dec 7, 2020 · 0 comments

Comments

@benoitkugler
Copy link

Hi !
This is not an issue, but rather a proposal; feel free to close it if not interested !

I would like to use oksvg to render svg files to an other target than an image: I have in mind a PDF file, but it could be any other target.

To do so, I propose an intermediate package which handles the svg parsing but do not import rasterx (or any other backend package). Instead it delegates the drawing to a Driver interface.

This interface is then easily implemented by a thin wrapper around rasterx, but may also be implemented by a PDF writter.

It's true that a PDF writer could directly implement the Scanner interface, but it would be rather inefficient since PDF directly supports high-level path painting operators.

I have a proof of concept at https://github.com/benoitkugler/oksvg : the raster backend is complete, and the PDF one is
in progress, but already support a large number of features.

If you considerer this idea interesting, we can discuss the details of a possible PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant