Skip to content

Better SVG module? #90

Open
Open

Description

@emmatyping

So, I know I didn't really deliver on #35 (thanks @BookOwl for working on that), but now there is a cython binding to nanosvg (one of the original ideas I had). It needs a bit of cleaning, and the build process needs to be made cross platform, but I think if that happens (or more exactly if I do that), I could probably re-write the Svg Api to no longer rely on imagemagick and use a module instead. Is this seen as an improvement? Is this desired?

Activity

  1. skistaddy commented on Oct 26, 2016

    @skistaddy
    Contributor

    A module would be much better in my opinion. 😀

  2. BookOwl commented on Oct 27, 2016

    @BookOwl
    Member

    Yes, I think that this would definitely be an improvement other what we currently are doing.
    Go for it.

  3. Tymewalk commented on Oct 30, 2016

    @Tymewalk
    Member

    @ethanhs That would be a HUGE improvement. Having a module would not only be much easier but also allow others to use SVGs without using Slither.

  4. emmatyping commented on Oct 30, 2016

    @emmatyping
    ContributorAuthor

    Okay. I have a big midterm on Thursday, but Im hoping Ill have time to work on it after that.

  5. emmatyping commented on Nov 3, 2016

    @emmatyping
    ContributorAuthor

    Well, trying to not think about my midterm later, I got it working :)

    The code is here. It may break. Let me know if there are questions. Installing: run git clone --recursize https://github.com/ethanhs/pynanosvg (so that it pulls nanosvg headers). Then it should be as easy as python setup.py install.

    The best way to use it is likely to use Pygame's image.frombuffer on the results of rasterize. You can get the width and height from the class methods. It is an RGBA image.

  6. BookOwl commented on Nov 3, 2016

    @BookOwl
    Member

    Great work! :D

  7. emmatyping commented on Nov 3, 2016

    @emmatyping
    ContributorAuthor

    Thanks! I plan on adding more error handling and tests, but the API should be 'stable' I think. (I also plan on adding it to PyPi).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions