1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SETMAPVIRTDEV_HXX 28 #define _SETMAPVIRTDEV_HXX 29 30 class OutputDevice; 31 class VirtualDevice; 32 class MapMode; 33 class Point; 34 35 /** method to set mapping/pixel offset for virtual output device 36 37 OD 12.11.2002 #96272# - method implements two solutions for the mapping of 38 the virtual output device: 39 The old solution set the origin of the mapping mode, which will be used in 40 the virtual output device. This causes several paint errors, because of the 41 different roundings in the virtual output device and the original output device. 42 The new solution avoids the rounding differences between virtual and original 43 output device by setting a pixel offset at the virtual output device. 44 A local boolean controls, which solution is used, in order to switch in 45 escalation back to old solution. 46 47 @author OD 48 49 @param _pOrgOutDev 50 input parameter - constant instance of the original output device, for which 51 the virtual output device is created. 52 53 @param _pVirDev 54 input/output parameter - instance of the virtual output device. 55 56 @param _pMapMode 57 input/output parameter - instance of the mapping mode, which will be set 58 at the virtual output device. 59 60 @param _rNewOrigin 61 input parameter - constant instance of the origin, which will be used in 62 the virtual output device 63 */ 64 void SetMappingForVirtDev( const Point& _rNewOrigin, 65 MapMode* _pMapMode, 66 const OutputDevice* _pOrgOutDev, 67 VirtualDevice* _pVirDev ); 68 69 70 #endif 71 72