mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:50:06 +02:00
TAChart: Scale label distances for printing. Update print demo.
git-svn-id: trunk@29705 -
This commit is contained in:
parent
c8db157feb
commit
d2306d0e8a
@ -14,6 +14,7 @@ object Form1: TForm1
|
||||
Width = 398
|
||||
AxisList = <
|
||||
item
|
||||
Marks.Distance = 10
|
||||
Marks.LabelFont.Height = -13
|
||||
Marks.Frame.Style = psSolid
|
||||
Title.LabelFont.Orientation = 900
|
||||
|
@ -679,7 +679,7 @@ begin
|
||||
else
|
||||
sz := CalcMarksSize(AExtent.a.X, AExtent.b.X).cy;
|
||||
if sz > 0 then
|
||||
sz += ADrawer.Scale(TickLength) + Marks.Distance;
|
||||
sz += ADrawer.Scale(TickLength) + ADrawer.Scale(Marks.Distance);
|
||||
with AMeasureData do begin
|
||||
FSize := Max(sz, FSize);
|
||||
FTitleSize := Max(CalcTitleSize, FTitleSize);
|
||||
|
@ -514,8 +514,11 @@ end;
|
||||
|
||||
function TGenericChartMarks.CenterOffset(
|
||||
ADrawer: IChartDrawer; const AText: String): TSize;
|
||||
var
|
||||
d: Integer;
|
||||
begin
|
||||
Result := Point(Distance, Distance);
|
||||
d := ADrawer.Scale(Distance);
|
||||
Result := Point(d, d);
|
||||
if not DistanceToCenter then
|
||||
Result += MeasureLabel(ADrawer, AText) div 2;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user