GdPicture image identifier.
The texture source file path. Can be an empty string. If empty, prompts the user to select a file. You can subsequently use the GetLastPath() method to retrieve the path of the selected file.
Text to draw.
Specifies the x-coordinate of the upper-left corner of the rectangle that bounds the.
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the.
The font size in units specified by the FontSetUnit() method.
A member of the FontStyle enumeration.
The name of the font. IE: "Arial".
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / DrawTextTextureFromFile Method

DrawTextTextureFromFile Method (GdPictureImaging)

In This Topic
Draws a textured text on a GdPicture image using a texture from a file.
Syntax
'Declaration
 
Public Function DrawTextTextureFromFile( _
   ByVal ImageID As Integer, _
   ByVal TextureFilePath As String, _
   ByVal Text As String, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal FontSize As Single, _
   ByVal FontStyle As GdPictureFontStyle, _
   ByVal FontName As String, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawTextTextureFromFile( 
   int ImageID,
   string TextureFilePath,
   string Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   string FontName,
   bool AntiAlias
)
public function DrawTextTextureFromFile( 
    ImageID: Integer;
    TextureFilePath: String;
    Text: String;
    DstLeft: Integer;
    DstTop: Integer;
    FontSize: Single;
    FontStyle: GdPictureFontStyle;
    FontName: String;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawTextTextureFromFile( 
   ImageID : int,
   TextureFilePath : String,
   Text : String,
   DstLeft : int,
   DstTop : int,
   FontSize : float,
   FontStyle : GdPictureFontStyle,
   FontName : String,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawTextTextureFromFile( 
   int ImageID,
   string* TextureFilePath,
   string* Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   string* FontName,
   bool AntiAlias
) 
public:
GdPictureStatus DrawTextTextureFromFile( 
   int ImageID,
   String^ TextureFilePath,
   String^ Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   String^ FontName,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
TextureFilePath
The texture source file path. Can be an empty string. If empty, prompts the user to select a file. You can subsequently use the GetLastPath() method to retrieve the path of the selected file.
Text
Text to draw.
DstLeft
Specifies the x-coordinate of the upper-left corner of the rectangle that bounds the.
DstTop
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the.
FontSize
The font size in units specified by the FontSetUnit() method.
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.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
Supported formats are listed here: http://www.gdpicture.com/solutions/supported-formats/.

This method requires the Image Documents component to run.

Example
Drawing text using image texture fill from file on a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.jpg");
 
    // Draw the text in the top left corner of the image.
    gdpictureImaging.DrawTextTextureFromFile(imageID, "texture.bmp", "GdPicture.Net", 5, 5, 24, GdPicture14.FontStyle.FontStyleRegular, "Arial", true);
    gdpictureImaging.SaveAsJPEG(imageID, "output.jpg");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also