Kaydet (Commit) d2bbef3d authored tarafından Herbert Dürr's avatar Herbert Dürr Kaydeden (comit) Caolán McNamara

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 ee042661)

Conflicts:
	vcl/aqua/source/gdi/ctlayout.cxx

Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db
üst bcc7086e
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment