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

Supporting rotation for the rasterizer #98

Open
dZbear opened this issue Jun 27, 2017 · 2 comments
Open

Supporting rotation for the rasterizer #98

dZbear opened this issue Jun 27, 2017 · 2 comments

Comments

@dZbear
Copy link

dZbear commented Jun 27, 2017

Hi all, I really love NanoSVG and was able to get everything going using our in-house OpenGL engine. I added some clamping logic so that when the rasterized image is bigger than the viewport, vertexes gets clamped, and the invoked call to nsvgRasterize reflects this by requesting only the visible portion, which in return makes zooming in extremely fast and efficient.

My issue comes when I rotate the resulting svg, I have no way of specifying an angle to the rasterizer. Does anyone have a good solution to cope up with rotation when working with svg that are exceeding the viewport's dimensions?

Thanks for any input!

@doublex
Copy link

doublex commented Apr 13, 2018

+1

@SergeySlice
Copy link

There are two questions:

  1. Make rasterizing not only with tx,ty,scale, but with full matrix including rotation.
  2. Correct calculate image box after rotation to fit into view box.
    I have no these solutions.

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

3 participants