浏览代码

* More detailed ToString

Michaël Van Canneyt 1 年之前
父节点
当前提交
bef0c95b40
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/base/fresnel.textlayouter.pas

+ 3 - 2
src/base/fresnel.textlayouter.pas

@@ -509,7 +509,8 @@ end;
 
 function TTextBlock.ToString: RTLString;
 begin
-  Result:=Format('(x: %g, y: %g, w: %g, h:%g) [Off: %d, len: %d]: >>%s<< ',[LayoutPos.X,LayoutPos.Y,Size.Width,Size.Height,TextOffset,TextLen,Text]);
+  Result:=Inherited ToString;
+  Result:=Result+Format(': (x: %g, y: %g, w: %g, h:%g) [Off: %d, len: %d]: >>%s<< ',[LayoutPos.X,LayoutPos.Y,Size.Width,Size.Height,TextOffset,TextLen,Text]);
 end;
 
 procedure TTextBlock.TrimTrailingWhiteSpace;
@@ -1123,7 +1124,7 @@ function TTextLayouter.ToString: RTLString;
 var
   I : Integer;
 begin
-  Result:='';
+  Result:=Inherited ToString+':';
   For I:=0 to TextBlockCount-1 do
     Result:=Result+TextBlocks[I].ToString+sLineBreak;
 end;