mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 11:18:21 +02:00
TAChart: Fix font height calculation in BGRA drawing back-end. Based on patch by "circular".
git-svn-id: trunk@40168 -
This commit is contained in:
parent
a3d9027f52
commit
1720aa9e61
@ -74,7 +74,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Graphics, TAGeometry;
|
BGRAText, Graphics, TAGeometry;
|
||||||
|
|
||||||
{ TBGRABitmapDrawer }
|
{ TBGRABitmapDrawer }
|
||||||
|
|
||||||
@ -243,7 +243,8 @@ end;
|
|||||||
procedure TBGRABitmapDrawer.SetFont(AFont: TFPCustomFont);
|
procedure TBGRABitmapDrawer.SetFont(AFont: TFPCustomFont);
|
||||||
begin
|
begin
|
||||||
Canvas.Font.Name := AFont.Name;
|
Canvas.Font.Name := AFont.Name;
|
||||||
Canvas.Font.Height := AFont.Size * 96 div 72;
|
Canvas.Font.Height :=
|
||||||
|
FontEmHeightSign * AFont.Size * ScreenInfo.PixelsPerInchY div 72;
|
||||||
Canvas.Font.Orientation := FGetFontOrientationFunc(AFont);
|
Canvas.Font.Orientation := FGetFontOrientationFunc(AFont);
|
||||||
Canvas.Font.BGRAColor := BGRAColorOrMono(AFont.FPColor);
|
Canvas.Font.BGRAColor := BGRAColorOrMono(AFont.FPColor);
|
||||||
if AFont is TFont then
|
if AFont is TFont then
|
||||||
|
Loading…
Reference in New Issue
Block a user