summaryrefslogtreecommitdiffstats
path: root/printing/units.cc
diff options
context:
space:
mode:
Diffstat (limited to 'printing/units.cc')
-rw-r--r--printing/units.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/printing/units.cc b/printing/units.cc
index 5f543fe..976fa80 100644
--- a/printing/units.cc
+++ b/printing/units.cc
@@ -39,4 +39,12 @@ int ConvertHundredThousanthMeterToMilliInch(int cmm) {
return ConvertUnit(cmm, 254, 100);
}
+int ConvertPixelsToPoint(int pixels) {
+ return ConvertUnit(pixels, kPixelsPerInch, kPointsPerInch);
+}
+
+double ConvertPixelsToPointDouble(double pixels) {
+ return ConvertUnitDouble(pixels, kPixelsPerInch, kPointsPerInch);
+}
+
} // namespace printing