summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-10-23 12:46:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-12 14:31:10 +0100
commite717d1dcce7f8906311c5ccdbb2326b61a702630 (patch)
tree91290db5179fa4b4927af94c0f023f40dcda434c /vcl/generic
parent9e50e5f82927742c56e89258b80bc8cd93bb7e3b (diff)
Resolves: #i121237# Rework/Cleanup of Region code...
due to missing complete support for B2DPolygon class (cherry picked from commit cab10eeb7878edf224a004fd7640bd4adf8d3c51) Conflicts: cppcanvas/source/mtfrenderer/implrenderer.cxx svx/source/sdr/overlay/overlaymanagerbuffered.cxx svx/source/svdraw/svdpntv.cxx vcl/aqua/source/gdi/salgdi.cxx vcl/inc/region.h vcl/inc/unx/gtk/gtkgdi.hxx vcl/inc/vcl/regband.hxx vcl/inc/vcl/region.hxx vcl/os2/source/gdi/salgdi.cxx vcl/source/gdi/bmpacc3.cxx vcl/source/gdi/outdev2.cxx vcl/source/gdi/outmap.cxx vcl/source/gdi/regband.cxx vcl/source/gdi/region.cxx vcl/source/window/window.cxx vcl/unx/generic/gdi/pspgraphics.cxx vcl/unx/headless/svpgdi.cxx vcl/unx/headless/svppspgraphics.cxx vcl/win/source/gdi/salgdi.cxx Change-Id: Iee9a66ff431c3cecb7603e445147b67715de0f7d Remove unused variable to prevent compiler warning (cherry picked from commit 0ac65ccf079e3e22ac23cbe7ae546504c863c31f) Change-Id: Icbcaa9d576a7e560d96debc7360bdbe9090b3fd3 Wrong comparison with bool corrected (cherry picked from commit 612cefdcf6176b6bb847ce899d89af40ef313a90) Change-Id: I1cf5de6734b588f78d8e870ba7b7860634b461ce
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontsubst.cxx1
-rw-r--r--vcl/generic/print/genpspgraphics.cxx42
2 files changed, 33 insertions, 10 deletions
diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
index 22b3d837863b..35f8294900be 100644
--- a/vcl/generic/fontmanager/fontsubst.cxx
+++ b/vcl/generic/fontmanager/fontsubst.cxx
@@ -30,7 +30,6 @@
#include "outdev.h"
#include "fontsubset.hxx"
#include "salprn.hxx"
-#include "region.h"
#include <unotools/fontdefs.hxx>
#include <list>
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 10af66051ddb..b9a1164b6aa8 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -43,7 +43,6 @@
#include "outfont.hxx"
#include "fontsubset.hxx"
#include "salprn.hxx"
-#include "region.h"
#include "langboost.hxx"
#include <config_graphite.h>
@@ -322,20 +321,45 @@ void GenPspGraphics::ResetClipRegion()
bool GenPspGraphics::setClipRegion( const Region& i_rClip )
{
// TODO: support polygonal clipregions here
- m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
+ RectangleVector aRectangles;
+ i_rClip.GetRegionRectangles(aRectangles);
+ m_pPrinterGfx->BeginSetClipRegion(aRectangles.size());
- ImplRegionInfo aInfo;
- long nX, nY, nW, nH;
- bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
- while( bRegionRect )
+ for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
{
- if ( nW && nH )
+ const long nW(aRectIter->GetWidth());
+
+ if(nW)
{
- m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ const long nH(aRectIter->GetHeight());
+
+ if(nH)
+ {
+ m_pPrinterGfx->UnionClipRegion(
+ aRectIter->Left(),
+ aRectIter->Top(),
+ nW,
+ nH);
+ }
}
- bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
}
+
m_pPrinterGfx->EndSetClipRegion();
+
+ //m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
+ //
+ //ImplRegionInfo aInfo;
+ //long nX, nY, nW, nH;
+ //bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ //while( bRegionRect )
+ //{
+ // if ( nW && nH )
+ // {
+ // m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ // }
+ // bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ //}
+ //m_pPrinterGfx->EndSetClipRegion();
return true;
}