license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
maruel@chromium.org | 4ae30d08 | 2009-02-20 17:55:55 | [diff] [blame^] | 5 | #ifndef PRINTING_UNITS_H_ |
| 6 | #define PRINTING_UNITS_H_ |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 7 | |
| 8 | namespace printing { |
| 9 | |
| 10 | // Length of a thousanth of inches in 0.01mm unit. |
| 11 | const int kHundrethsMMPerInch = 2540; |
| 12 | |
| 13 | // Converts from one unit system to another using integer arithmetics. |
| 14 | int ConvertUnit(int value, int old_unit, int new_unit); |
| 15 | |
| 16 | // Converts from one unit system to another using doubles. |
| 17 | double ConvertUnitDouble(double value, double old_unit, double new_unit); |
| 18 | |
| 19 | // Converts from 0.001 inch unit to 0.00001 meter. |
| 20 | int ConvertMilliInchToHundredThousanthMeter(int milli_inch); |
| 21 | |
| 22 | // Converts from 0.00001 meter unit to 0.001 inch. |
| 23 | int ConvertHundredThousanthMeterToMilliInch(int cmm); |
| 24 | |
| 25 | } // namespace printing |
| 26 | |
maruel@chromium.org | 4ae30d08 | 2009-02-20 17:55:55 | [diff] [blame^] | 27 | #endif // PRINTING_UNITS_H_ |