Hi, I would like to know how can I measure text in fpVectorial. I need to draw a segment with text in the middle of the segment and I can't find any helper function to do that.
Example. Here's more or less what I want to draw:
|---- 10cm ----|
As you see, the text "10cm" is in the middle of the segment, to do that, I usually use this function:
lText := '10cm';
lTextWidth := GetTextWidth(lText);
lSegmentWidth := 1000;
lTextPosX := (lSegmentWidth / 2) - (lTextWidth / 2);Also, I whould like to be able to draw the text rotated to follow the angle of the segment. Is this possible?.
Thanks in advance,
Leonardo M. Ram?
http://leonardorame.blogspot.com
