diff options
Diffstat (limited to 'vcl/coretext')
-rw-r--r-- | vcl/coretext/salgdi2.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vcl/coretext/salgdi2.cxx b/vcl/coretext/salgdi2.cxx index 819d9f9d4693..cf7e7e1a3f37 100644 --- a/vcl/coretext/salgdi2.cxx +++ b/vcl/coretext/salgdi2.cxx @@ -873,6 +873,35 @@ bool SvpSalGraphics::CheckContext() CGContextScaleCTM( mrContext, 1, -1 ); } + + if (mrContext) + { + RectangleVector aRectangles; + m_aClipRegion.GetRegionRectangles(aRectangles); + + CGContextBeginPath( mrContext ); + + for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++) + { + const long nW(aRectIter->Right() - aRectIter->Left() + 1); // uses +1 logic in original + + if(nW) + { + const long nH(aRectIter->Bottom() - aRectIter->Top() + 1); // uses +1 logic in original + + if(nH) + { + CGRect aRect = {{ (CGFloat) aRectIter->Left(), (CGFloat) aRectIter->Top() }, { (CGFloat) nW, (CGFloat) nH }}; + CGContextAddRect( mrContext, aRect ); + } + } + } + + CGContextClip(mrContext); + + } + + SAL_INFO( "vcl.ios", "CheckContext: context=" << mrContext ); return ( mrContext != NULL ); |