Code

Extensions. Add option to choose dxf output units
[inkscape.git] / src / sp-metrics.cpp
index 27d65422fc397b4f6dca08a30ed07e6bfb665e19..5e34d9ab95d60a5b900700c31fc3b73b00529c91 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
  * SPMetric handling and stuff
- * I hope this will be usefull :-) 
+ * I hope this will be usefull :-)
  */
 
 gdouble
@@ -25,9 +25,15 @@ sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, con
   case SP_IN:
     src = IN_PER_IN;
     break;
+  case SP_FT:
+    src = FT_PER_IN;
+    break;
   case SP_PT:
     src = PT_PER_IN;
     break;
+  case SP_PC:
+    src = PC_PER_IN;
+    break;
   case SP_PX:
     src = PX_PER_IN;
     break;
@@ -49,9 +55,15 @@ sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, con
   case SP_IN:
     dst = IN_PER_IN;
     break;
+  case SP_FT:
+    dst = FT_PER_IN;
+    break;
   case SP_PT:
     dst = PT_PER_IN;
     break;
+  case SP_PC:
+    dst = PC_PER_IN;
+    break;
   case SP_PX:
     dst = PX_PER_IN;
     break;
@@ -73,7 +85,7 @@ sp_metric_to_metric_string(gdouble const length,
 {
     gdouble const len = sp_absolute_metric_to_metric(length, metric_src, metric_dst);
     GString *str = g_string_new("");
-    g_string_printf(str, "%0.02f", len); 
+    g_string_printf(str, "%0.02f", len);
     /* We need a fixed number of fractional digits, because otherwise the live statusbar display of
      * lengths will be too jerky */
 
@@ -105,4 +117,4 @@ sp_metric_to_metric_string(gdouble const length,
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :