OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "printing/units.h" | 5 #include "printing/units.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace printing { | 9 namespace printing { |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 int ConvertPixelsToPoint(int pixels) { | 42 int ConvertPixelsToPoint(int pixels) { |
43 return ConvertUnit(pixels, kPixelsPerInch, kPointsPerInch); | 43 return ConvertUnit(pixels, kPixelsPerInch, kPointsPerInch); |
44 } | 44 } |
45 | 45 |
46 double ConvertPixelsToPointDouble(double pixels) { | 46 double ConvertPixelsToPointDouble(double pixels) { |
47 return ConvertUnitDouble(pixels, kPixelsPerInch, kPointsPerInch); | 47 return ConvertUnitDouble(pixels, kPixelsPerInch, kPointsPerInch); |
48 } | 48 } |
49 | 49 |
| 50 double ConvertPointsToPixelDouble(double points) { |
| 51 return ConvertUnitDouble(points, kPointsPerInch, kPixelsPerInch); |
| 52 } |
| 53 |
50 } // namespace printing | 54 } // namespace printing |
OLD | NEW |