DrawTextTextureFromGdPictureImage Method (GdPictureImaging)
Draws a textured text on a GdPicture image using a texture from a GdPicture image.
public GdPictureStatus DrawTextTextureFromGdPictureImage(
int ,
int ,
string ,
int ,
int ,
float ,
FontStyle ,
string ,
bool
)
public function DrawTextTextureFromGdPictureImage(
: Integer;
: Integer;
: String;
: Integer;
: Integer;
: Single;
: FontStyle;
: String;
: Boolean
): GdPictureStatus;
public function DrawTextTextureFromGdPictureImage(
: int,
: int,
: String,
: int,
: int,
: float,
: FontStyle,
: String,
: boolean
) : GdPictureStatus;
public: GdPictureStatus DrawTextTextureFromGdPictureImage(
int ,
int ,
string* ,
int ,
int ,
float ,
FontStyle ,
string* ,
bool
)
public:
GdPictureStatus DrawTextTextureFromGdPictureImage(
int ,
int ,
String^ ,
int ,
int ,
float ,
FontStyle ,
String^ ,
bool
)
'Declaration
Public Function DrawTextTextureFromGdPictureImage( _
ByVal As Integer, _
ByVal As Integer, _
ByVal As String, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Single, _
ByVal As FontStyle, _
ByVal As String, _
ByVal As Boolean _
) As 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.
Drawing text using image texture fill from GdPicture image on a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.jpg");
int imageTextureID = gdpictureImaging.CreateGdPictureImageFromFile("texture.bmp");
// Draw the text in the top left corner of the image.
gdpictureImaging.DrawTextTextureFromGdPictureImage(imageID, imageTextureID, "GdPicture.Net", 5, 5, 24, GdPicture14.FontStyle.FontStyleRegular, "Arial", true);
gdpictureImaging.SaveAsJPEG(imageID, "output.jpg");
gdpictureImaging.ReleaseGdPictureImage(imageID);
}