GdPicture.NET Reference Guide
DrawTextTextureFromGdPictureImage Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawTextTextureFromGdPictureImage Method
GdPicture Image Identifier.
GdPicture Image Identifier. Source image used for the texture.
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.
Draws a textured text on a GdPicture image using a texture from a GdPicture image.
Syntax
'Declaration
 
Public Function DrawTextTextureFromGdPictureImage( _
   ByVal ImageID As Integer, _
   ByVal ImageTexture As Integer, _
   ByVal Text As String, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal FontSize As Single, _
   ByVal FontStyle As FontStyle, _
   ByVal FontName As String, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public function DrawTextTextureFromGdPictureImage( 
   ImageID : int,
   ImageTexture : int,
   Text : String,
   DstLeft : int,
   DstTop : int,
   FontSize : float,
   FontStyle : FontStyle,
   FontName : String,
   AntiAlias : boolean
) : GdPictureStatus;

Parameters

ImageID
GdPicture Image Identifier.
ImageTexture
GdPicture Image Identifier. Source image used for the texture.
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.
Example
Drawing yext on the image with texture loaded from a GdPicture Image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim TextureImage As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("texture.tif")
   If TextureImage <> 0 Then
      oGdPictureImaging.DrawTextTextureFromFile(ImageID, TextureImage, "GdPicture Imaging", 50, 50, 10.0, FontStyle.FontStyleRegular, "Arial",  True)
      oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
      oGdPictureImaging.ReleaseGdPictureImage(TextureImage)
   Else
      MessageBox.Show("Error: Cannot load texture file:" + oGdPictureImaging.GetStat().ToString())
   End If
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
FontSetUnit Method
FontGetUnit Method