sdrpaintwindow.cxx (a56bd57b) | sdrpaintwindow.cxx (e6f63103) |
---|---|
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 --- 48 unchanged lines hidden (view full) --- 57 // #i29186# 58 maPreRenderDevice.SetDrawMode(mrOutputDevice.GetDrawMode()); 59 maPreRenderDevice.SetSettings(mrOutputDevice.GetSettings()); 60} 61 62void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion) 63{ 64 // region to pixels | 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 --- 48 unchanged lines hidden (view full) --- 57 // #i29186# 58 maPreRenderDevice.SetDrawMode(mrOutputDevice.GetDrawMode()); 59 maPreRenderDevice.SetSettings(mrOutputDevice.GetSettings()); 60} 61 62void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion) 63{ 64 // region to pixels |
65 Region aRegionPixel(mrOutputDevice.LogicToPixel(rExpandedRegion)); 66 RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects()); 67 Rectangle aRegionRectanglePixel; | 65 const Region aRegionPixel(mrOutputDevice.LogicToPixel(rExpandedRegion)); 66 //RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects()); 67 //Rectangle aRegionRectanglePixel; |
68 69 // MapModes off 70 sal_Bool bMapModeWasEnabledDest(mrOutputDevice.IsMapModeEnabled()); 71 sal_Bool bMapModeWasEnabledSource(maPreRenderDevice.IsMapModeEnabled()); 72 mrOutputDevice.EnableMapMode(sal_False); 73 maPreRenderDevice.EnableMapMode(sal_False); 74 | 68 69 // MapModes off 70 sal_Bool bMapModeWasEnabledDest(mrOutputDevice.IsMapModeEnabled()); 71 sal_Bool bMapModeWasEnabledSource(maPreRenderDevice.IsMapModeEnabled()); 72 mrOutputDevice.EnableMapMode(sal_False); 73 maPreRenderDevice.EnableMapMode(sal_False); 74 |
75 while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel)) 76 { 77 // for each rectangle, copy the area 78 const Point aTopLeft(aRegionRectanglePixel.TopLeft()); 79 const Size aSize(aRegionRectanglePixel.GetSize()); | 75 RectangleVector aRectangles; 76 aRegionPixel.GetRegionRectangles(aRectangles); |
80 | 77 |
81 mrOutputDevice.DrawOutDev( 82 aTopLeft, aSize, 83 aTopLeft, aSize, 84 maPreRenderDevice); | 78 for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++) 79 { 80 // for each rectangle, copy the area 81 const Point aTopLeft(aRectIter->TopLeft()); 82 const Size aSize(aRectIter->GetSize()); |
85 | 83 |
84 mrOutputDevice.DrawOutDev( 85 aTopLeft, aSize, 86 aTopLeft, aSize, 87 maPreRenderDevice); 88 |
|
86#ifdef DBG_UTIL | 89#ifdef DBG_UTIL |
87 // #i74769# 88 static bool bDoPaintForVisualControlRegion(false); 89 if(bDoPaintForVisualControlRegion) 90 { 91 Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80)); 92 mrOutputDevice.SetLineColor(aColor); 93 mrOutputDevice.SetFillColor(); 94 mrOutputDevice.DrawRect(aRegionRectanglePixel); 95 } | 90 // #i74769# 91 static bool bDoPaintForVisualControlRegion(false); 92 93 if(bDoPaintForVisualControlRegion) 94 { 95 const Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80)); 96 97 mrOutputDevice.SetLineColor(aColor); 98 mrOutputDevice.SetFillColor(); 99 mrOutputDevice.DrawRect(*aRectIter); 100 } |
96#endif | 101#endif |
97 } | 102 } |
98 | 103 |
99 aRegionPixel.EndEnumRects(aRegionHandle); | 104// while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel)) 105// { 106// // for each rectangle, copy the area 107// const Point aTopLeft(aRegionRectanglePixel.TopLeft()); 108// const Size aSize(aRegionRectanglePixel.GetSize()); 109// 110// mrOutputDevice.DrawOutDev( 111// aTopLeft, aSize, 112// aTopLeft, aSize, 113// maPreRenderDevice); 114// 115//#ifdef DBG_UTIL 116// // #i74769# 117// static bool bDoPaintForVisualControlRegion(false); 118// if(bDoPaintForVisualControlRegion) 119// { 120// Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80)); 121// mrOutputDevice.SetLineColor(aColor); 122// mrOutputDevice.SetFillColor(); 123// mrOutputDevice.DrawRect(aRegionRectanglePixel); 124// } 125//#endif 126// } 127// 128// aRegionPixel.EndEnumRects(aRegionHandle); |
100 101 mrOutputDevice.EnableMapMode(bMapModeWasEnabledDest); 102 maPreRenderDevice.EnableMapMode(bMapModeWasEnabledSource); 103} 104 105//////////////////////////////////////////////////////////////////////////////////////////////////// 106 107void SdrPaintWindow::impCreateOverlayManager() --- 181 unchanged lines hidden --- | 129 130 mrOutputDevice.EnableMapMode(bMapModeWasEnabledDest); 131 maPreRenderDevice.EnableMapMode(bMapModeWasEnabledSource); 132} 133 134//////////////////////////////////////////////////////////////////////////////////////////////////// 135 136void SdrPaintWindow::impCreateOverlayManager() --- 181 unchanged lines hidden --- |