Commits

Martin Vejnár  committed 662c196

Changed stroke-width to px units.

I introduced mm units to CSS styles in a previous commit,
but those were wrong---they must be in user units (i.e. px).
Unfortunately, Adobe Illustrator can't handle this correctly
(Inkscape, Firefox, even libsvg for c# can).

  • Participants
  • Parent commits 98aceba

Comments (0)

Files changed (1)

File eagle2svg.ulp

   real real_width = u2mm(width);
   if (real_width < g_minimum_wire_width)
     real_width = g_minimum_wire_width;
-  sprintf(style, "stroke:%s;stroke-width:%fmm;stroke-linecap:%s", g_layer_colors[layer], real_width, lineCap);
+  sprintf(style, "stroke:%s;stroke-width:%fpx;stroke-linecap:%s", g_layer_colors[layer], real_width, lineCap);
   return style;    
 }
 
   if (g_used_layers[layer]==0) {
     return;
   }
-  printf("<circle cx='%f' cy='%f' r='%f' style='stroke-width:%fmm;stroke:%s'/>\n", 
+  printf("<circle cx='%f' cy='%f' r='%f' style='stroke-width:%fpx;stroke:%s'/>\n", 
     u2mm(x), u2mm(-y),
     u2mm(radius), 
     u2mm(lwidth),
     case PAD_SHAPE_ROUND:
     default:
       svgWriteDot(x, y, diameter, layer);
-/*      printf("<circle cx='%f' cy='%f' r='%f' style='stroke:%s;stroke-width:%fmm'/>\n", 
+/*      printf("<circle cx='%f' cy='%f' r='%f' style='stroke:%s;stroke-width:%fpx'/>\n", 
         u2mm(x), u2mm(-y),
         u2mm((diameter-drill)/2+drill)/2.0,
         g_layer_colors[layer],
     return;
   }
 
-  printf( "<path style='fill:%s;stroke:%s;stroke-width:%fmm;stroke-linejoin:round' d='",
+  printf( "<path style='fill:%s;stroke:%s;stroke-width:%fpx;stroke-linejoin:round' d='",
     g_layer_colors[P.layer], g_layer_colors[P.layer], u2mm(P.width));
 
   int poly_id = 1;