mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 13:39:24 +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
|
Width = 398
|
||||||
AxisList = <
|
AxisList = <
|
||||||
item
|
item
|
||||||
|
Marks.Distance = 10
|
||||||
Marks.LabelFont.Height = -13
|
Marks.LabelFont.Height = -13
|
||||||
Marks.Frame.Style = psSolid
|
Marks.Frame.Style = psSolid
|
||||||
Title.LabelFont.Orientation = 900
|
Title.LabelFont.Orientation = 900
|
||||||
|
@ -679,7 +679,7 @@ begin
|
|||||||
else
|
else
|
||||||
sz := CalcMarksSize(AExtent.a.X, AExtent.b.X).cy;
|
sz := CalcMarksSize(AExtent.a.X, AExtent.b.X).cy;
|
||||||
if sz > 0 then
|
if sz > 0 then
|
||||||
sz += ADrawer.Scale(TickLength) + Marks.Distance;
|
sz += ADrawer.Scale(TickLength) + ADrawer.Scale(Marks.Distance);
|
||||||
with AMeasureData do begin
|
with AMeasureData do begin
|
||||||
FSize := Max(sz, FSize);
|
FSize := Max(sz, FSize);
|
||||||
FTitleSize := Max(CalcTitleSize, FTitleSize);
|
FTitleSize := Max(CalcTitleSize, FTitleSize);
|
||||||
|
@ -514,8 +514,11 @@ end;
|
|||||||
|
|
||||||
function TGenericChartMarks.CenterOffset(
|
function TGenericChartMarks.CenterOffset(
|
||||||
ADrawer: IChartDrawer; const AText: String): TSize;
|
ADrawer: IChartDrawer; const AText: String): TSize;
|
||||||
|
var
|
||||||
|
d: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Point(Distance, Distance);
|
d := ADrawer.Scale(Distance);
|
||||||
|
Result := Point(d, d);
|
||||||
if not DistanceToCenter then
|
if not DistanceToCenter then
|
||||||
Result += MeasureLabel(ADrawer, AText) div 2;
|
Result += MeasureLabel(ADrawer, AText) div 2;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user