Kaydet (Commit) ffd4c2e4 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Try calling RefreshRect() in DrawText() like in the ATSUI code

But like there, I don't know if it actually is needed or not.

Change-Id: I25bf5d8cf160b56ee4deb47ab9774313eb9590c8
üst cbb8b5db
......@@ -20,6 +20,7 @@
#include <iostream>
#include <iomanip>
#include "quartz/utils.h"
#include "coretext/common.h"
#include "coretext/salcoretextstyle.hxx"
......@@ -187,6 +188,29 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
CGContextTranslateCTM(gr.mrContext, pos.X(), pos.Y());
CGContextShowGlyphs(gr.mrContext, mpGlyphs, mnGlyphCount);
#ifndef IOS
// Request an update of the changed window area. Like in the ATSUI
// code, I am not sure if this is actually necessary. Once this
// seems to work fine otherwise, let's try removing this.
if( gr.IsWindowGraphics() )
{
CGRect drawRect = CTLineGetImageBounds( mpLine, gr.mrContext );
SAL_INFO( "vcl.coretext.layout", "drawRect=" << drawRect );
if( !CGRectIsNull( drawRect ) ) {
#if 1
// For kicks, try the same silly (?) enlarging of the
// rectangle as in the ATSUI code
drawRect.origin.y -= drawRect.size.height;
drawRect.size.height += 2*drawRect.size.height;
SAL_INFO( "vcl.coretext.layout", "after enlarging drawRect=" << drawRect );
#endif
drawRect = CGContextConvertRectToDeviceSpace( gr.mrContext, drawRect );
SAL_INFO( "vcl.coretext.layout", "after convert: drawRect=" << drawRect );
gr.RefreshRect( drawRect );
}
}
#endif
// restore the original graphic context transformations
CGContextRestoreGState( gr.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