mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
Cocoa: fix Font Orientation issue #40855 (by Johann)
This commit is contained in:
parent
9c22f26428
commit
0ac0870a84
@ -1801,7 +1801,6 @@ var
|
||||
RunCount: Integer;
|
||||
Glyphs: array of CGGlyph;
|
||||
RunFont: CTFontRef;
|
||||
transform: NSAffineTransform;
|
||||
Dict: NSMutableDictionary;
|
||||
YPrime, StrikeH, StrikeW: CGFloat;
|
||||
lForegroundColor: NSColor;
|
||||
@ -1866,14 +1865,9 @@ begin
|
||||
ctx.setShouldAntialias(Font.Antialiased);
|
||||
if FFont.RotationDeg <> 0 then
|
||||
begin
|
||||
transform := NSAffineTransform.transform;
|
||||
transform.translateXBy_yBy(X, Y);
|
||||
if ctx.isFlipped then
|
||||
transform.rotateByDegrees( FFont.RotationDeg )
|
||||
else
|
||||
transform.rotateByDegrees( -FFont.RotationDeg );
|
||||
transform.translateXBy_yBy(-X, -Y);
|
||||
transform.concat;
|
||||
CGContextTranslateCTM(cg, X, Y);
|
||||
CGContextRotateCTM(cg, -FFont.RotationDeg*Pi/180);
|
||||
CGContextTranslateCTM(cg, -X, -Y);
|
||||
end;
|
||||
|
||||
CGContextTranslateCTM(cg, 0, FSize.Height);
|
||||
|
Loading…
Reference in New Issue
Block a user