Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / MeasureTextBox Method
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 Integer, _
       ByRef Top As Integer, _
       ByRef Width As Integer, _
       ByRef Height As Integer, _
       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 int Left,
       ref int Top,
       ref int Width,
       ref int 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: Integer;
       var  Top: Integer;
       var  Width: Integer;
       var  Height: Integer;
        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 : int,
       Top : int,
       Width : int,
       Height : int,
       FontSize : float,
       Alignment : TextAlignment,
       FontStyle : FontStyle,
       FontName : String,
       AntiAlias : boolean,
       CharactersFitted : int,
       LinesFilled : int
    ) : GdPictureStatus;
    public: GdPictureStatus MeasureTextBox( 
       int ImageID,
       string* Text,
       ref int Left,
       ref int Top,
       ref int Width,
       ref int Height,
       float FontSize,
       TextAlignment Alignment,
       FontStyle FontStyle,
       string* FontName,
       bool AntiAlias,
       ref int CharactersFitted,
       ref int LinesFilled
    ) 
    public:
    GdPictureStatus MeasureTextBox( 
       int ImageID,
       String^ Text,
       int% Left,
       int% Top,
       int% Width,
       int% 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.
    See Also