1 /* 2 SANE EPSON backend 3 Copyright (C) 2001, 2005 SEIKO EPSON Corporation 4 5 This file is part of the `iscan' program. 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 21 As a special exception, the copyright holders give permission 22 to link the code of this program with the esmod library and 23 distribute linked combinations including the two. You must obey 24 the GNU General Public License in all respects for all of the 25 code used other then esmod. 26 */ 27 28 #ifndef ___PISA_CHANGE_UNIT_H 29 #define ___PISA_CHANGE_UNIT_H 30 31 double inches_reflect_zoom ( double inch, long zoom ); 32 double inch2centi ( double inch, long zoom = 100 ); 33 34 // Convenience API to convert dimensions to pixels the same way as the 35 // epkowa backend does. 36 37 long inch2width (double inch, long resolution, long zoom = 100, 38 bool monochrome = false); 39 long inch2height (double inch, long resolution, long zoom = 100); 40 long inch2pixel (double inch, long resolution, long zoom = 100); 41 long inch2pixel (bool is_width, 42 double inch, long resolution, long zoom = 100); 43 44 long centi2width (double centi, long resolution, long zoom = 100); 45 long centi2height (double centi, long resolution, long zoom = 100); 46 long centi2pixel (double centi, long resolution, long zoom = 100); 47 long centi2pixel (bool is_width, 48 double centi, long resolution, long zoom = 100); 49 50 #endif // ___PISA_CHANGE_UNIT_H 51