TAChart: Scale label distances for printing. Update print demo.

git-svn-id: trunk@29705 -
This commit is contained in:
ask 2011-03-02 09:47:04 +00:00
parent c8db157feb
commit d2306d0e8a
3 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;