summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx47
-rw-r--r--svx/source/svdraw/svdfmtf.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx45
3 files changed, 58 insertions, 38 deletions
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 3df44a1bac2b..9651ae710cae 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -56,9 +56,9 @@ void SdrPreRenderDevice::PreparePreRenderDevice()
void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion)
{
// region to pixels
- Region aRegionPixel(mrOutputDevice.LogicToPixel(rExpandedRegion));
- RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects());
- Rectangle aRegionRectanglePixel;
+ const Region aRegionPixel(mrOutputDevice.LogicToPixel(rExpandedRegion));
+ //RegionHandle aRegionHandle(aRegionPixel.BeginEnumRects());
+ //Rectangle aRegionRectanglePixel;
// MapModes off
sal_Bool bMapModeWasEnabledDest(mrOutputDevice.IsMapModeEnabled());
@@ -66,11 +66,14 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion)
mrOutputDevice.EnableMapMode(sal_False);
maPreRenderDevice.EnableMapMode(sal_False);
- while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+ RectangleVector aRectangles;
+ aRegionPixel.GetRegionRectangles(aRectangles);
+
+ for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
{
// for each rectangle, copy the area
- const Point aTopLeft(aRegionRectanglePixel.TopLeft());
- const Size aSize(aRegionRectanglePixel.GetSize());
+ const Point aTopLeft(aRectIter->TopLeft());
+ const Size aSize(aRectIter->GetSize());
mrOutputDevice.DrawOutDev(
aTopLeft, aSize,
@@ -80,17 +83,43 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion)
#ifdef DBG_UTIL
// #i74769#
static bool bDoPaintForVisualControlRegion(false);
+
if(bDoPaintForVisualControlRegion)
{
- Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80));
+ const Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80));
+
mrOutputDevice.SetLineColor(aColor);
mrOutputDevice.SetFillColor();
- mrOutputDevice.DrawRect(aRegionRectanglePixel);
+ mrOutputDevice.DrawRect(*aRectIter);
}
#endif
}
- aRegionPixel.EndEnumRects(aRegionHandle);
+// while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
+// {
+// // for each rectangle, copy the area
+// const Point aTopLeft(aRegionRectanglePixel.TopLeft());
+// const Size aSize(aRegionRectanglePixel.GetSize());
+//
+// mrOutputDevice.DrawOutDev(
+// aTopLeft, aSize,
+// aTopLeft, aSize,
+// maPreRenderDevice);
+//
+//#ifdef DBG_UTIL
+// // #i74769#
+// static bool bDoPaintForVisualControlRegion(false);
+// if(bDoPaintForVisualControlRegion)
+// {
+// Color aColor((((((rand()&0x7f)|0x80)<<8L)|((rand()&0x7f)|0x80))<<8L)|((rand()&0x7f)|0x80));
+// mrOutputDevice.SetLineColor(aColor);
+// mrOutputDevice.SetFillColor();
+// mrOutputDevice.DrawRect(aRegionRectanglePixel);
+// }
+//#endif
+// }
+//
+// aRegionPixel.EndEnumRects(aRegionHandle);
mrOutputDevice.EnableMapMode(bMapModeWasEnabledDest);
maPreRenderDevice.EnableMapMode(bMapModeWasEnabledSource);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 0789a39f3af5..f6c485859713 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -800,9 +800,7 @@ void ImpSdrGDIMetaFileImport::checkClip()
{
if(maVD.IsClipRegion())
{
- Region aRegion(maVD.GetClipRegion());
-
- maClip = aRegion.ConvertToB2DPolyPolygon();
+ maClip = maVD.GetClipRegion().GetAsB2DPolyPolygon();
if(isClip())
{
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index db7feab72467..222b05c314c5 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -617,19 +617,31 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c
#ifdef DBG_UTIL
// #i74769# test-paint repaint region
static bool bDoPaintForVisualControl(false);
+
if(bDoPaintForVisualControl)
{
- RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
- Rectangle aRegionRectangle;
+ RectangleVector aRectangles;
+ aOptimizedRepaintRegion.GetRegionRectangles(aRectangles);
+
+ pWindow->SetLineColor(COL_LIGHTGREEN);
+ pWindow->SetFillColor();
- while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
+ for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
{
- pWindow->SetLineColor(COL_LIGHTGREEN);
- pWindow->SetFillColor();
- pWindow->DrawRect(aRegionRectangle);
+ pWindow->DrawRect(*aRectIter);
}
- aOptimizedRepaintRegion.EndEnumRects(aRegionHandle);
+ //RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
+ //Rectangle aRegionRectangle;
+ //
+ //while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
+ //{
+ // pWindow->SetLineColor(COL_LIGHTGREEN);
+ // pWindow->SetFillColor();
+ // pWindow->DrawRect(aRegionRectangle);
+ //}
+ //
+ //aOptimizedRepaintRegion.EndEnumRects(aRegionHandle);
}
#endif
}
@@ -840,25 +852,6 @@ Region SdrPaintView::OptimizeDrawLayersRegion(OutputDevice* pOut, const Region&
if(!pWindow->GetPaintRegion().IsEmpty())
{
aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
-
-#ifdef DBG_UTIL
- // #i74769# test-paint repaint region
- static bool bDoPaintForVisualControl(false);
- if(bDoPaintForVisualControl)
- {
- RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects());
- Rectangle aRegionRectangle;
-
- while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
- {
- pWindow->SetLineColor(COL_LIGHTGREEN);
- pWindow->SetFillColor();
- pWindow->DrawRect(aRegionRectangle);
- }
-
- aOptimizedRepaintRegion.EndEnumRects(aRegionHandle);
- }
-#endif
}
}
}