xref: /aoo42x/main/sw/source/core/inc/setmapvirtdev.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SETMAPVIRTDEV_HXX
24 #define _SETMAPVIRTDEV_HXX
25 
26 class OutputDevice;
27 class VirtualDevice;
28 class MapMode;
29 class Point;
30 
31 /** method to set mapping/pixel offset for virtual output device
32 
33     OD 12.11.2002 #96272# - method implements two solutions for the mapping of
34     the virtual output device:
35     The old solution set the origin of the mapping mode, which will be used in
36     the virtual output device. This causes several paint errors, because of the
37     different roundings in the virtual output device and the original output device.
38     The new solution avoids the rounding differences between virtual and original
39     output device by setting a pixel offset at the virtual output device.
40     A local boolean controls, which solution is used, in order to switch in
41     escalation back to old solution.
42 
43     @author OD
44 
45     @param _pOrgOutDev
46     input parameter - constant instance of the original output device, for which
47     the virtual output device is created.
48 
49     @param _pVirDev
50     input/output parameter - instance of the virtual output device.
51 
52     @param _pMapMode
53     input/output parameter - instance of the mapping mode, which will be set
54     at the virtual output device.
55 
56     @param _rNewOrigin
57     input parameter - constant instance of the origin, which will be used in
58     the virtual output device
59 */
60 void SetMappingForVirtDev(  const Point&    _rNewOrigin,
61                             MapMode*        _pMapMode,
62                             const OutputDevice* _pOrgOutDev,
63                             VirtualDevice*  _pVirDev );
64 
65 
66 #endif
67 
68