|
@@ -23,6 +23,13 @@ Type
|
|
{$ELSE}
|
|
{$ELSE}
|
|
TTextString = UnicodeString;
|
|
TTextString = UnicodeString;
|
|
TFontNameString = UnicodeString;
|
|
TFontNameString = UnicodeString;
|
|
|
|
+ {$ENDIF}
|
|
|
|
+ {$IF FPC_FULLVERSION<=30301}
|
|
|
|
+ RTLString = string;
|
|
|
|
+ TSizeF = record
|
|
|
|
+ X, Y: single;
|
|
|
|
+ end;
|
|
|
|
+
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
|
|
|
|
ETextLayout = Class(Exception);
|
|
ETextLayout = Class(Exception);
|
|
@@ -642,7 +649,8 @@ end;
|
|
|
|
|
|
function TTextLayoutBounds.GetAsPoint: TTextPoint;
|
|
function TTextLayoutBounds.GetAsPoint: TTextPoint;
|
|
begin
|
|
begin
|
|
- Result:=PointF(Width,Height);
|
|
|
|
|
|
+ Result.x:=Width;
|
|
|
|
+ Result.y:=Height;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTextLayoutBounds.SetAsPoint(AValue: TTextPoint);
|
|
procedure TTextLayoutBounds.SetAsPoint(AValue: TTextPoint);
|
|
@@ -692,7 +700,7 @@ end;
|
|
|
|
|
|
function TTextLayoutBounds.ToString: RTLString;
|
|
function TTextLayoutBounds.ToString: RTLString;
|
|
begin
|
|
begin
|
|
- Result:=ClassName+': '+AsPoint.ToString
|
|
|
|
|
|
+ Result:=ClassName+': '+FloatToStr(Width)+','+FloatToStr(Height);
|
|
end;
|
|
end;
|
|
|
|
|
|
{ TTextSplitter }
|
|
{ TTextSplitter }
|
|
@@ -1646,12 +1654,16 @@ end;
|
|
|
|
|
|
function TTextLayouter.GetTotalSize: TSizeF;
|
|
function TTextLayouter.GetTotalSize: TSizeF;
|
|
begin
|
|
begin
|
|
- Result:=TSizeF.Create(GetTotalWidth,GetTotalHeight);
|
|
|
|
|
|
+ Result.X:=GetTotalWidth;
|
|
|
|
+ Result.Y:=GetTotalHeight;
|
|
end;
|
|
end;
|
|
|
|
|
|
function TTextLayouter.GetBoundsRect: TRectF;
|
|
function TTextLayouter.GetBoundsRect: TRectF;
|
|
begin
|
|
begin
|
|
- Result:=TRectF.Create(GetMinLeft,GetMinTop,GetMaxRight,GetMaxBottom);
|
|
|
|
|
|
+ Result.Left:=GetMinLeft;
|
|
|
|
+ Result.Top:=GetMinTop;
|
|
|
|
+ Result.Right:=GetMaxRight;
|
|
|
|
+ Result.Bottom:=GetMaxBottom;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TTextLayouter.ApplyStretchMode(const ADesiredHeight: TTextUnits);
|
|
procedure TTextLayouter.ApplyStretchMode(const ADesiredHeight: TTextUnits);
|