I want to draw polygon and path elements in svg in cm instead that in pixel (the default option). I was able to do it for line and rectangle adding cm after the number but the following svg code does not work:
<svg width="70cm" height="70cm">
<polygon points="1cm,1cm 2.5cm, 1cm 3cm, 13cm 1cm, 13cm"
style="stroke: #000099;
fill: #3333cc;
fill-opacity: 1;
"
/>
</svg>
Same for path. Does anyone know how to solve this?
UPDATE: I tried with different screens, reading a svg file with inkscape or with Chrome. I measured cm on the screen, since I want real-world cm for the shapes that I draw. Here the puzzling results with:
<svg width="20cm" height="20cm" viewBox="0 0 20 20" >
<polygon points='1,1 2.5,1 3,10 1,10'
style="stroke: #000000; fill:none;"/>
</svg>
macbook air screen, 118 pixel per inch: the polygon is never in real measures, always smaller, both in inkscape and Chrome on another screen, 166 pixel per inches, measures are ok in Chrome but not in Inkscape. The same if I try to import in SVG-edit.
Does anybody know what's wrong in Inkscape?
Thanks