You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Drawing (Text) > GetTextWidth Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.GetTextWidth Method

Calculate the width of the specified text, based on the specified font, font size and font style. The result is measured in units specified by the FontSetUnit() function.

C#
public Single GetTextWidth(
    int ImageID, 
    String Text, 
    String FontName, 
    Single FontSize, 
    FontStyle FontStyle
);
Visual Basic
Public Function GetTextWidth(
    ByVal ImageID As Integer, 
    ByVal Text As String, 
    ByVal FontName As String, 
    ByVal FontSize As Single, 
    ByVal FontStyle As FontStyle
) As Single
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier.  
Text 
Text to draw.  
FontName 
The name of the font. IE: "Arial"  
FontSize 
The font size in units specified by the FontSetUnit() function.  
FontStyle 
A member of the FontStyle enumeration.  
Returns

The width of the text measured in units specified by the FontSetUnit() function.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.