summaryrefslogtreecommitdiff
path: root/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/overlay/overlaymanagerbuffered.cxx')
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx80
1 files changed, 61 insertions, 19 deletions
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 81b53b27bb0e..47d76f835d00 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -109,33 +109,33 @@ namespace sdr
void OverlayManagerBuffered::ImpRestoreBackground(const Region& rRegionPixel) const
{
- // local region
- Region aRegionPixel(rRegionPixel);
- RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects());
- Rectangle aRegionRectanglePixel;
-
// MapModes off
const bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
const bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
getOutputDevice().EnableMapMode(false);
((OverlayManagerBuffered*)this)->maBufferDevice.EnableMapMode(false);
- while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+ // local region
+ RectangleVector aRectangles;
+ rRegionPixel.GetRegionRectangles(aRectangles);
+
+ for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
{
#ifdef DBG_UTIL
// #i72754# possible graphical region test only with non-pro
static bool bDoPaintForVisualControl(false);
+
if(bDoPaintForVisualControl)
{
getOutputDevice().SetLineColor(COL_LIGHTGREEN);
getOutputDevice().SetFillColor();
- getOutputDevice().DrawRect(aRegionRectanglePixel);
+ getOutputDevice().DrawRect(*aRectIter);
}
#endif
// restore the area
- const Point aTopLeft(aRegionRectanglePixel.TopLeft());
- const Size aSize(aRegionRectanglePixel.GetSize());
+ const Point aTopLeft(aRectIter->TopLeft());
+ const Size aSize(aRectIter->GetSize());
getOutputDevice().DrawOutDev(
aTopLeft, aSize, // destination
@@ -143,7 +143,33 @@ namespace sdr
maBufferDevice);
}
- aRegionPixel.EndEnumRects(aRegionHandle);
+ //Region aRegionPixel(rRegionPixel);
+ //RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects());
+ //Rectangle aRegionRectanglePixel;
+ //
+ //while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+ //{
+#ifdef DBG_U//TIL
+ // // #i72754# possible graphical region test only with non-pro
+ // static bool bDoPaintForVisualControl(false);
+ // if(bDoPaintForVisualControl)
+ // {
+ // getOutputDevice().SetLineColor(COL_LIGHTGREEN);
+ // getOutputDevice().SetFillColor();
+ // getOutputDevice().DrawRect(aRegionRectanglePixel);
+ // }
+#endif //
+ // // restore the area
+ // const Point aTopLeft(aRegionRectanglePixel.TopLeft());
+ // const Size aSize(aRegionRectanglePixel.GetSize());
+ //
+ // getOutputDevice().DrawOutDev(
+ // aTopLeft, aSize, // destination
+ // aTopLeft, aSize, // source
+ // maBufferDevice);
+ //}
+ //
+ //aRegionPixel.EndEnumRects(aRegionHandle);
// restore MapModes
getOutputDevice().EnableMapMode(bMapModeWasEnabledDest);
@@ -175,24 +201,24 @@ namespace sdr
}
// also limit to buffer size
- const Rectangle aBufferDeviceRectanglePixel = Rectangle(Point(), maBufferDevice.GetOutputSizePixel());
+ const Rectangle aBufferDeviceRectanglePixel(Point(), maBufferDevice.GetOutputSizePixel());
aRegion.Intersect(aBufferDeviceRectanglePixel);
- // prepare to iterate over the rectangles from the region in pixels
- RegionHandle aRegionHandle(aRegion.BeginEnumRects());
- Rectangle aRegionRectanglePixel;
-
// MapModes off
const bool bMapModeWasEnabledDest(rSource.IsMapModeEnabled());
const bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
rSource.EnableMapMode(false);
maBufferDevice.EnableMapMode(false);
- while(aRegion.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+ // prepare to iterate over the rectangles from the region in pixels
+ RectangleVector aRectangles;
+ aRegion.GetRegionRectangles(aRectangles);
+
+ for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
{
// for each rectangle, save the area
- Point aTopLeft(aRegionRectanglePixel.TopLeft());
- Size aSize(aRegionRectanglePixel.GetSize());
+ const Point aTopLeft(aRectIter->TopLeft());
+ const Size aSize(aRectIter->GetSize());
maBufferDevice.DrawOutDev(
aTopLeft, aSize, // destination
@@ -200,7 +226,23 @@ namespace sdr
rSource);
}
- aRegion.EndEnumRects(aRegionHandle);
+ //RegionHandle aRegionHandle(aRegion.BeginEnumRects());
+ //Rectangle aRegionRectanglePixel;
+ //
+ //while(aRegion.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+ //{
+ // // for each rectangle, save the area
+ // Point aTopLeft(aRegionRectanglePixel.TopLeft());
+ // Size aSize(aRegionRectanglePixel.GetSize());
+ //
+ // maBufferDevice.DrawOutDev(
+ // aTopLeft, aSize, // destination
+ // aTopLeft, aSize, // source
+ // rSource);
+ //
+ //}
+ //
+ //aRegion.EndEnumRects(aRegionHandle);
// restore MapModes
rSource.EnableMapMode(bMapModeWasEnabledDest);