Inkscape.org
Beginners' Questions Please explain use of measurements
  1. #1
    Robert Prins Robert Prins @robert.ah.prins

    I'm trying to convert an old PNG image to SVG. It's a simple one, a rectangle (610(W)x100(H px), with in the middle a black line (6 px), overlaid with 6 circles containing a bit of text.

    So, I

    - set measurements to PX

    - created a new object of 1830 x 300 px, with the same viewport

    - F4'ed and sized the resulting rectangle to 18px wide, and 1830px

    Then I tried to position it, and for some totally unfathomable reason, the Y coordinates of the box are from 80 to 380, in other words if I want the rectangle to lie against the top Y=80, if I want to lie it against the bottom, Y=362.

    Can anyone please explain the why of this. I can cope with reversed directions, but where the, I won't say it, do those 80 pixels above the box come from?

  2. #2
    Tyler Durden Tyler Durden @TylerDurden
    robert.ah.prins

    - set measurements to PX

    Do you mean Display units and Custom page size units to px?

     

    robert.ah.prins

    - created a new object of 1830 x 300 px...

    Do you mean "Page"?

     

    robert.ah.prins

    ...with the same viewport...

    Do you mean "viewbox"?

     

    robert.ah.prins

    Then I tried to position it, and for some totally unfathomable reason, the Y coordinates of the box are from 80 to 380, in other words if I want the rectangle to lie against the top Y=80, if I want to lie it against the bottom, Y=362. Can anyone please explain the why of this. I can cope with reversed directions, but where the, I won't say it, do those 80 pixels above the box come from?

     

    You understand the origin of the Inkscape page is lower-left (as in most Cartesian coordinates)? And that the origin of each object is also lower left?

    Are the rulers at the top and left of the work area visible?

     

    TD

  3. #3
    Robert Prins Robert Prins @prino

    OK, my terminology may not be correct and in the end I gave up on Inkscape, but this is what I eventually created, based on another .SVG that I had, and by nearly continuously pressing F5 in FF to refresh the Notepad++ saved file. It shows correctly in FF, Palemoon, and Chrome. However, the text inside the circles does not show correctly in Inkscape itself, so I'm still doing something wrong. Can anyone tell me what?

    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="http://www.w3.org/2000/svg"
         width="1322"
         height="230">
      <g>
        <rect style="color:#000000;" width="1322" height="16" x="0" y="108" />

        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="52"   cy="116" r="50" />
        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="220"  cy="116" r="65" />
        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="515"  cy="116" r="85" />
        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="800"  cy="116" r="85" />
        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="1050" cy="116" r="79" />
        <circle style="fill:#ffffff;stroke:#000000;stroke-width:5px;" cx="1270" cy="116" r="50" />
      </g>

      <g style="font-size:26px;line-height:125%;font-family:sans-serif;fill:#000000;">
        <text x="12"   y="124">Départ</text>
        <text x="163"  y="124">Décollage</text>
        <text x="442"  y="124">Intermédiare</text>
        <text x="727"  y="124">Intermédiare</text>
        <text x="978"  y="124">Atternissage</text>
        <text x="1230" y="124">Arrivée</text>
      </g>
    </svg>

     

     

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Please explain use of measurements