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.