summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-24 10:30:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-25 09:20:55 +0100
commit8eb8ef879320960fe2147a039bbb933484856693 (patch)
tree8bb6dbbb590328f95198df3f58eb1754457e5150 /vcl/headless
parentedf56cb4300f68a3e513420feccbf8d5287a0428 (diff)
gtk3: fix 'degenerate' clip in cairo clipping
fix spelling in basebmp clipping case and downgrade to INFO Change-Id: I16ec943bd4be8ca374ded7827e4ec24e7df03e8e
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpgdi.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index afc1bc44f5f8..ebacfbb0425b 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -119,10 +119,13 @@ namespace
void SvpSalGraphics::clipRegion(cairo_t* cr)
{
+ RectangleVector aRectangles;
if (!m_aClipRegion.IsEmpty())
{
- RectangleVector aRectangles;
m_aClipRegion.GetRegionRectangles(aRectangles);
+ }
+ if (!aRectangles.empty())
+ {
for (RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
{
cairo_rectangle(cr, aRectIter->Left(), aRectIter->Top(), aRectIter->GetWidth(), aRectIter->GetHeight());
@@ -149,6 +152,8 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
cairo_translate(cr, 0.0, -m_aDevice->getSize().getY());
}
+ clipRegion(cr);
+
const double fTransparency = (100 - nTransparency) * (1.0/100);
cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
m_aFillColor.getGreen()/255.0,
@@ -326,7 +331,7 @@ bool SvpSalGraphics::isClippedSetup( const basegfx::B2IBox &aRange, SvpSalGraphi
if( nHit == 0 ) // rendering outside any clipping region
{
- SAL_WARN("vcl.headless", "SvpSalGraphics::isClippedSetup: denegerate case detected ...\n");
+ SAL_INFO("vcl.headless", "SvpSalGraphics::isClippedSetup: degenerate case detected ...");
return true;
}
else if( nHit == 1 ) // common path: rendering against just one clipping region
@@ -335,10 +340,10 @@ bool SvpSalGraphics::isClippedSetup( const basegfx::B2IBox &aRange, SvpSalGraphi
{
//The region to be painted (aRect) is equal to or inside the
//current clipping region
- SAL_WARN("vcl.headless", "SvpSalGraphics::isClippedSetup: is inside ! avoid deeper clip ...\n");
+ SAL_INFO("vcl.headless", "SvpSalGraphics::isClippedSetup: is inside ! avoid deeper clip ...");
return false;
}
- SAL_WARN("vcl.headless", "SvpSalGraphics::isClippedSetup: operation only overlaps with a single clip zone\n");
+ SAL_INFO("vcl.headless", "SvpSalGraphics::isClippedSetup: operation only overlaps with a single clip zone");
rUndo.m_aDevice = m_aDevice;
m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
basegfx::B2IBox (aHitRect.Left(),