mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 07:58:16 +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;
|
||||
|
||||
procedure TCanvasDrawer.SetFont(AFont: TFPCustomFont);
|
||||
var
|
||||
st: TFontStyles = [];
|
||||
begin
|
||||
GetCanvas.Font.Assign(AFont);
|
||||
if FMonochromeColor <> clTAColor then
|
||||
GetCanvas.Font.Color := FMonochromeColor;
|
||||
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
|
||||
Color := FMonochromeColor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCanvasDrawer.SetPen(APen: TFPCustomPen);
|
||||
|
Loading…
Reference in New Issue
Block a user