TAChart: Add workaround for issue #19780

git-svn-id: trunk@31813 -
This commit is contained in:
ask 2011-07-28 01:33:39 +00:00
parent 7e8b3df07f
commit 727c3782d1
2 changed files with 9 additions and 5 deletions

View File

@ -569,7 +569,9 @@ var
function TitleSize: Integer;
begin
if not Title.Visible or (Title.Caption = '') then exit(0);
Result := TPointBoolArr(Title.MeasureLabel(d, Title.Caption))[not v];
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
with Title.MeasureLabel(d, Title.Caption) do
Result := IfThen(v, cx, cy);
if Title.DistanceToCenter then
Result := Result div 2;
Result += d.Scale(Title.Distance);
@ -579,8 +581,9 @@ var
var
sz, fm, lm: Integer;
begin
sz := TPointBoolArr(
Marks.MeasureLabel(d, FMarkValues[AIndex].FText))[v] div 2;
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
with Marks.MeasureLabel(d, FMarkValues[AIndex].FText) do
sz := IfThen(v, cy, cx) div 2;
fm := sz - ACoord + ARMin;
lm := sz - ARMax + ACoord;
if v then

View File

@ -530,8 +530,9 @@ begin
Result := 0;
if not Visible then exit;
for t in AValues do
Result := Max(
TPointBoolArr(MeasureLabel(ADrawer, t.FText))[AIsVertical], Result);
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
with MeasureLabel(ADrawer, t.FText) do
Result := Max(IfThen(AIsVertical, cy, cx), Result);
if Result = 0 then exit;
if DistanceToCenter then
Result := Result div 2;