GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / DrawRotatedText Method / DrawRotatedText(Int32,Single,String,Int32,Int32,Single,GdPictureFontStyle,Int32,String,Boolean) Method
GdPicture image identifier.
Angle of rotation in degrees.
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.
Color of the text. A suitable color value can be obtained by using the ARGBI() method.
The name of the font. IE: "Arial".
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
DrawRotatedText(Int32,Single,String,Int32,Int32,Single,GdPictureFontStyle,Int32,String,Boolean) Method
In This Topic
Draws a rotated text on a GdPicture image. The drawing color is specified with an integer value.
Syntax
'Declaration
 
Public Overloads Function DrawRotatedText( _
   ByVal ImageID As Integer, _
   ByVal Angle As Single, _
   ByVal Text As String, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal FontSize As Single, _
   ByVal FontStyle As GdPictureFontStyle, _
   ByVal TextColor As Integer, _
   ByVal FontName As String, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawRotatedText( 
   int ImageID,
   float Angle,
   string Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   int TextColor,
   string FontName,
   bool AntiAlias
)
public function DrawRotatedText( 
    ImageID: Integer;
    Angle: Single;
    Text: String;
    DstLeft: Integer;
    DstTop: Integer;
    FontSize: Single;
    FontStyle: GdPictureFontStyle;
    TextColor: Integer;
    FontName: String;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawRotatedText( 
   ImageID : int,
   Angle : float,
   Text : String,
   DstLeft : int,
   DstTop : int,
   FontSize : float,
   FontStyle : GdPictureFontStyle,
   TextColor : int,
   FontName : String,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawRotatedText( 
   int ImageID,
   float Angle,
   string* Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   int TextColor,
   string* FontName,
   bool AntiAlias
) 
public:
GdPictureStatus DrawRotatedText( 
   int ImageID,
   float Angle,
   String^ Text,
   int DstLeft,
   int DstTop,
   float FontSize,
   GdPictureFontStyle FontStyle,
   int TextColor,
   String^ FontName,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
Angle
Angle of rotation in degrees.
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.
TextColor
Color of the text. A suitable color value can be obtained by using the ARGBI() method.
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
To draw watermark text use an ARGB value with alpha component < 255.

This method requires the Image Documents component to run.

This method requires the Image Documents component to run.

Example
Drawing red text "GdPicture.Net" with 45 degree rotation on a png image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.png");
 
    // Draw the text in the top left corner of the image with 45 degree rotation
    gdpictureImaging.DrawRotatedText(imageID, 45, "GdPicture.Net", 15, 5, 24, GdPicture14.FontStyle.FontStyleRegular, gdpictureImaging.ARGBI(255, 255, 0, 0), "Arial", true);
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also