mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 00:29:28 +02:00
TAChart: Allow assignment of TFPCustomFont to Font property of canvas drawer
git-svn-id: trunk@41892 -
This commit is contained in:
parent
f918fa7475
commit
b11380a102
@ -292,10 +292,32 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCanvasDrawer.SetFont(AFont: TFPCustomFont);
|
procedure TCanvasDrawer.SetFont(AFont: TFPCustomFont);
|
||||||
|
var
|
||||||
|
st: TFontStyles = [];
|
||||||
begin
|
begin
|
||||||
GetCanvas.Font.Assign(AFont);
|
with GetCanvas.Font do begin
|
||||||
|
if AFont is TFont then
|
||||||
|
Assign(AFont)
|
||||||
|
else begin
|
||||||
|
BeginUpdate;
|
||||||
|
FPColor := AFont.FPColor;
|
||||||
|
Name := AFont.Name;
|
||||||
|
Size := AFont.Size;
|
||||||
|
Orientation := AFont.Orientation;
|
||||||
|
if AFont.Italic then
|
||||||
|
Include(st, fsItalic);
|
||||||
|
if AFont.Bold then
|
||||||
|
Include(st, fsBold);
|
||||||
|
if AFont.Underline then
|
||||||
|
Include(st, fsUnderline);
|
||||||
|
if AFont.StrikeTrough then
|
||||||
|
Include(st, fsStrikeOut);
|
||||||
|
Style := st;
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
if FMonochromeColor <> clTAColor then
|
if FMonochromeColor <> clTAColor then
|
||||||
GetCanvas.Font.Color := FMonochromeColor;
|
Color := FMonochromeColor;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCanvasDrawer.SetPen(APen: TFPCustomPen);
|
procedure TCanvasDrawer.SetPen(APen: TFPCustomPen);
|
||||||
|
Loading…
Reference in New Issue
Block a user