TsgDXFMText.box property: Always valid ?
Posted: 10 Mar 2011, 17:23
Hello
( i use CAD Import/Export VCL 7.4. & Delphi 2007 )
i want draw a line, for make " underline text style "
for know the lenght text, i use TsgDXFMText.Box propertie.
my code is:
Result := TsgDXFMText.Create;
Result.Point := Position
Result.Text := ' this is a exemple...'
Result.Angle := 0;
...etc...
for test the TsgDXFMText.box property, i add this code:
A1.X := Result.Box.TopLeft.X;
A1.Y := Result.Box.TopLeft.Y;
A2.X := Result.Box.BottomRight.X;
A2.Y := Result.Box.BottomRight.Y
and i draw a yellow rectangle: A1,A2.
SEE image : http://www.typonrelais.com/temp/bug.png
QUESTION: is box property result always valid ?
with Arial font, it's ok.
with comic sans MS font, it's not ok.
Why ?
or how know the text lenght ?
thanks
Pascal - France
( i use CAD Import/Export VCL 7.4. & Delphi 2007 )
i want draw a line, for make " underline text style "
for know the lenght text, i use TsgDXFMText.Box propertie.
my code is:
Result := TsgDXFMText.Create;
Result.Point := Position
Result.Text := ' this is a exemple...'
Result.Angle := 0;
...etc...
for test the TsgDXFMText.box property, i add this code:
A1.X := Result.Box.TopLeft.X;
A1.Y := Result.Box.TopLeft.Y;
A2.X := Result.Box.BottomRight.X;
A2.Y := Result.Box.BottomRight.Y
and i draw a yellow rectangle: A1,A2.
SEE image : http://www.typonrelais.com/temp/bug.png
QUESTION: is box property result always valid ?
with Arial font, it's ok.
with comic sans MS font, it's not ok.
Why ?
or how know the text lenght ?
thanks
Pascal - France