vcl/quartz/ctlayout.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit af9203676b014509c04c0495d2189e04b633f6b9
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
    
    (cherry picked from commit d2bbef3d3d6c7be096175ddbdb788ece5067f5fc)
    
    Conflicts:
        vcl/quartz/ctlayout.cxx
    
    Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db
    Reviewed-on: https://gerrit.libreoffice.org/9628
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index a39f00e..1d96f90 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -344,13 +344,8 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, 
CTLineRef ctline, cons
 
     CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y 
);
 
-    // set the text color as fill color (see 
kCTForegroundColorFromContextAttributeName)
-    CGContextSetFillColor( rAquaGraphics.mrContext, 
rAquaGraphics.maTextColor.AsArray() );
-
-    // 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 );
@@ -358,6 +353,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
     CGContextRestoreGState( rAquaGraphics.mrContext );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to