summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-12-15 07:01:07 +0000
committerRüdiger Timm <rt@openoffice.org>2008-12-15 07:01:07 +0000
commit46b3f2d50dc387b2b635de5f7d675e4c6a9a202a (patch)
tree598d70a841d0994ce7f5b489de6fde46ce793067 /canvas
parent21fd41dec5d745cfacc131867acb8d09bf4ba509 (diff)
CWS-TOOLING: integrate CWS ooo301gsl2_DEV300
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx72
1 files changed, 72 insertions, 0 deletions
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 768466662a94..6127aa8f401b 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -714,6 +714,39 @@ namespace vclcanvas
}
}
else
+#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!)
+ {
+ const Region aPolyClipRegion( rPoly );
+
+ rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.SetClipRegion( aPolyClipRegion );
+
+ doGradientFill( rOutDev,
+ rValues,
+ rColor1,
+ rColor2,
+ aTextureTransform,
+ aPolygonDeviceRectOrig,
+ nStepCount,
+ false );
+ rOutDev.Pop();
+
+ if( p2ndOutDev )
+ {
+ p2ndOutDev->Push( PUSH_CLIPREGION );
+ p2ndOutDev->SetClipRegion( aPolyClipRegion );
+ doGradientFill( *p2ndOutDev,
+ rValues,
+ rColor1,
+ rColor2,
+ aTextureTransform,
+ aPolygonDeviceRectOrig,
+ nStepCount,
+ false );
+ p2ndOutDev->Pop();
+ }
+ }
+#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant
{
// output gradient the hard way: XORing out the polygon
rOutDev.Push( PUSH_RASTEROP );
@@ -767,6 +800,7 @@ namespace vclcanvas
p2ndOutDev->Pop();
}
}
+#endif // complex-clipping vs. XOR-trick
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
{
@@ -1203,6 +1237,43 @@ namespace vclcanvas
aOutputBmpEx );
}
else
+#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!)
+ {
+ const Region aPolyClipRegion( aPolyPoly );
+
+ rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.SetClipRegion( aPolyClipRegion );
+
+ textureFill( rOutDev,
+ *pGrfObj,
+ aPt,
+ aIntegerNextTileX,
+ aIntegerNextTileY,
+ nTilesX,
+ nTilesY,
+ aSz,
+ aGrfAttr );
+ rOutDev.Pop();
+
+ if( mp2ndOutDev )
+ {
+ OutputDevice& r2ndOutDev( mp2ndOutDev->getOutDev() );
+ r2ndOutDev.Push( PUSH_CLIPREGION );
+
+ r2ndOutDev.SetClipRegion( aPolyClipRegion );
+ textureFill( r2ndOutDev,
+ *pGrfObj,
+ aPt,
+ aIntegerNextTileX,
+ aIntegerNextTileY,
+ nTilesX,
+ nTilesY,
+ aSz,
+ aGrfAttr );
+ r2ndOutDev.Pop();
+ }
+ }
+#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant
{
// output via repeated XORing
rOutDev.Push( PUSH_RASTEROP );
@@ -1261,6 +1332,7 @@ namespace vclcanvas
r2ndOutDev.Pop();
}
}
+#endif // complex-clipping vs. XOR-trick
}
}
}