Inkscape.org
Beginners' Questions Failure pn parisng the SVG
  1. #1
    oneeyeman oneeyeman @oneeyeman

    Hi, ALL,

    I have one weird problem.

    ย 

    I have 2 SVGs - one downloaded from the Web and one I made inside InkScape.

    ย 

    In my program I'm using nanoSVGย  to parse and render them.

    ย 

    The query.svg was downloaded and the libraryclosed.svg was made inside inkscape.

    ย 

    Could someone please explain what is the difference between them so that I can fix the one I made and move on with my development?

    ย 

    Thank you.

    ย 

    Libraryclosed
    Query
  2. #2
    Polygon Polygon @Polygonโš–๐ŸŒถ
    *

    Check "Libraryclosed.svg" in View->Display mode->Outline what a mess it is you have 13 objects in your file when just 4ย are needed:

    I tried to make it pixel-perfect when crisp rendering is enabled:

    ย 

  3. #3
    oneeyeman oneeyeman @oneeyeman

    polygon,

    Could you please explain what did you do?

    ย 

    I also have libraryOpen icon which looks the same.

    ย 

    Thank you

    ย 

  4. #4
    Polygon Polygon @Polygonโš–๐ŸŒถ

    I set the Bounding Box to "Visual bounding box" in Preferences->Tools and snapping to a 1px grid - when making a "bitmap copy" set its rendering mode to "Crisp edges" or "Pixelate".

  5. #5
    oneeyeman oneeyeman @oneeyeman

    @Polygon,

    I have the "Visual bounding box" set.

    How do I set the snapping to 1px?

    ย 

    Thank you.

    ย 

  6. #6
    Polygon Polygon @Polygonโš–๐ŸŒถ

    I believe your file has grid set already to 1px - otherwise open Document Properties and add a new grid/units=px (no major grid lines).

  7. #7
    oneeyeman oneeyeman @oneeyeman

    @polygon,

    [quote]

    and snapping to a 1px grid - when making a "bitmap copy" set its rendering mode to "Crisp edges" or "Pixelate".

    [/quote]

    ย 

    I added the grid.

    Now what?

    ย 

    Where is the Snap To Grid button?

    And what purpose there is for copying bitmap?

    ย 

    Thank you.

    ย 

  8. #8
    Polygon Polygon @Polygonโš–๐ŸŒถ

    Snapping panel is in the upper right corner. Use the Node tool to drag corners to grid and let it snap. Aren `t you use the icons as bitmap in an application? If so you can check for any anti aliasing issues.