mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 16:52:37 +02:00
TAChart: Improve font size support in fpvectorial back-end
git-svn-id: trunk@30527 -
This commit is contained in:
parent
88604dfc35
commit
0830ff3c25
@ -30,6 +30,7 @@ type
|
||||
strict private
|
||||
FBrushColor: TvColor;
|
||||
FCanvas: TvVectorialDocument;
|
||||
FFontSize: Integer;
|
||||
FPenColor: TvColor;
|
||||
strict protected
|
||||
function GetFontAngle: Double; override;
|
||||
@ -70,7 +71,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
TAChartUtils, TAGeometry;
|
||||
Math, TAChartUtils, TAGeometry;
|
||||
|
||||
function ChartColorToVColor(AColor: TChartColor): TvColor;
|
||||
begin
|
||||
@ -244,7 +245,7 @@ end;
|
||||
|
||||
procedure TFPVectorialDrawer.SetFont(AFont: TFPCustomFont);
|
||||
begin
|
||||
// Not implemented.
|
||||
FFontSize := IfThen(AFont.Size = 0, 10, AFont.Size);
|
||||
end;
|
||||
|
||||
procedure TFPVectorialDrawer.SetPen(APen: TFPCustomPen);
|
||||
@ -261,8 +262,8 @@ end;
|
||||
|
||||
function TFPVectorialDrawer.SimpleTextExtent(const AText: String): TPoint;
|
||||
begin
|
||||
Result.X := Length(AText) * 8;
|
||||
Result.Y := 8;
|
||||
Result.X := FFontSize * Length(AText) * 2 div 3;
|
||||
Result.Y := FFontSize;
|
||||
end;
|
||||
|
||||
procedure TFPVectorialDrawer.SimpleTextOut(
|
||||
|
Loading…
Reference in New Issue
Block a user