vcl/quartz/ctlayout.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
New commits: commit d2bbef3d3d6c7be096175ddbdb788ece5067f5fc Author: Herbert Dürr <h...@apache.org> Date: Mon Jun 2 11:30:49 2014 +0000 Related: #i125020# fix the calculation of the text-update rectangle... in CoreText by doing the calculation before CTLineDraw() updates the text position. Requesting the update early is possible because that update region is not used until AquaSalInstance::Yield(). (cherry picked from commit ee042661b996fd00d5504caf4f4be60f77bf880f) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 8c42cc8..46c55a3 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -356,14 +356,8 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons SAL_INFO( "vcl.ct", "CGContextSetTextPosition(" << rAquaGraphics.mrContext << "," << aTextPos << ")" ); CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); - // set the text color as fill color (see kCTForegroundColorFromContextAttributeName) - CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); - - SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); - // draw the text - CTLineDraw( ctline, rAquaGraphics.mrContext ); #ifndef IOS - // request an update of the changed window area + // request an update of the to-be-changed window area if( rAquaGraphics.IsWindowGraphics() ) { const CGRect aInkRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext ); @@ -371,6 +365,14 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons rAquaGraphics.RefreshRect( aRefreshRect ); } #endif + + // set the text color as fill color (see kCTForegroundColorFromContextAttributeName) + CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + + SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); + // draw the text + CTLineDraw( ctline, rAquaGraphics.mrContext ); + // restore the original graphic context transformations SAL_INFO( "vcl.ct", "CGContextRestoreGState(" << rAquaGraphics.mrContext << ")" ); CGContextRestoreGState( rAquaGraphics.mrContext );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits