GdPicture image identifier.
Text to draw.
Specifies/Receives the x-coordinate of the upper-left corner of the text box.
Specifies/Receives the y-coordinate of the upper-left corner of the text box.
Specifies/Receives the width, in pixels, of the text box.
Specifies/Receives the height, in pixels, of the text box.
The font size in units specified by the FontSetUnit() method.
A member of the TextAlign enumeration.
A member of the FontStyle enumeration.
The name of the font. IE: "Arial".
Set to True to apply the Antialiasing algorithm else False.
Receives the number of characters that actually fit into the layout rectangle.
Receives the number of lines that fit into the layout rectangle.





In This Topic

MeasureTextBox Method (GdPictureImaging)

In This Topic
Measures the specified string when drawn with the specified Font and the specified alignment.
Syntax
'Declaration
 
Public Function MeasureTextBox( _
   ByVal ImageID As Integer, _
   ByVal Text As String, _
   ByRef Left As Single, _
   ByRef Top As Single, _
   ByRef Width As Single, _
   ByRef Height As Single, _
   ByVal FontSize As Single, _
   ByVal Alignment As TextAlignment, _
   ByVal FontStyle As FontStyle, _
   ByVal FontName As String, _
   ByVal AntiAlias As Boolean, _
   ByRef CharactersFitted As Integer, _
   ByRef LinesFilled As Integer _
) As GdPictureStatus
public GdPictureStatus MeasureTextBox( 
   int ImageID,
   string Text,
   ref float Left,
   ref float Top,
   ref float Width,
   ref float Height,
   float FontSize,
   TextAlignment Alignment,
   FontStyle FontStyle,
   string FontName,
   bool AntiAlias,
   ref int CharactersFitted,
   ref int LinesFilled
)
public function MeasureTextBox( 
    ImageID: Integer;
    Text: String;
   var  Left: Single;
   var  Top: Single;
   var  Width: Single;
   var  Height: Single;
    FontSize: Single;
    Alignment: TextAlignment;
    FontStyle: FontStyle;
    FontName: String;
    AntiAlias: Boolean;
   var  CharactersFitted: Integer;
   var  LinesFilled: Integer
): GdPictureStatus; 
public function MeasureTextBox( 
   ImageID : int,
   Text : String,
   Left : float,
   Top : float,
   Width : float,
   Height : float,
   FontSize : float,
   Alignment : TextAlignment,
   FontStyle : FontStyle,
   FontName : String,
   AntiAlias : boolean,
   CharactersFitted : int,
   LinesFilled : int
) : GdPictureStatus;
public: GdPictureStatus MeasureTextBox( 
   int ImageID,
   string* Text,
   ref float Left,
   ref float Top,
   ref float Width,
   ref float Height,
   float FontSize,
   TextAlignment Alignment,
   FontStyle FontStyle,
   string* FontName,
   bool AntiAlias,
   ref int CharactersFitted,
   ref int LinesFilled
) 
public:
GdPictureStatus MeasureTextBox( 
   int ImageID,
   String^ Text,
   float% Left,
   float% Top,
   float% Width,
   float% Height,
   float FontSize,
   TextAlignment Alignment,
   FontStyle FontStyle,
   String^ FontName,
   bool AntiAlias,
   int% CharactersFitted,
   int% LinesFilled
) 

Parameters

ImageID
GdPicture image identifier.
Text
Text to draw.
Left
Specifies/Receives the x-coordinate of the upper-left corner of the text box.
Top
Specifies/Receives the y-coordinate of the upper-left corner of the text box.
Width
Specifies/Receives the width, in pixels, of the text box.
Height
Specifies/Receives the height, in pixels, of the text box.
FontSize
The font size in units specified by the FontSetUnit() method.
Alignment
A member of the TextAlign enumeration.
FontStyle
A member of the FontStyle enumeration.
FontName
The name of the font. IE: "Arial".
AntiAlias
Set to True to apply the Antialiasing algorithm else False.
CharactersFitted
Receives the number of characters that actually fit into the layout rectangle.
LinesFilled
Receives the number of lines that fit into the layout rectangle.
Remarks

This method requires the Image Documents component to run.

See Also