SetTextUnderlineColor Method (GdPicturePDF)
In This Topic
Sets text underline color for all subsequent text drawing operations.
Syntax
'Declaration
Public Function SetTextUnderlineColor( _
ByVal As Byte, _
ByVal As Byte, _
ByVal As Byte _
) As GdPictureStatus
public GdPictureStatus SetTextUnderlineColor(
byte ,
byte ,
byte
)
public function SetTextUnderlineColor(
: Byte;
: Byte;
: Byte
): GdPictureStatus;
public function SetTextUnderlineColor(
: byte,
: byte,
: byte
) : GdPictureStatus;
public: GdPictureStatus SetTextUnderlineColor(
byte ,
byte ,
byte
)
public:
GdPictureStatus SetTextUnderlineColor(
byte ,
byte ,
byte
)
Parameters
- Red
- The amount of red color to be used for the resulting text decoration color. Use the value between 0 and 255.
- Green
- The amount of green color to be used for the resulting text decoration color. Use the value between 0 and 255.
- Blue
- The amount of blue color to be used for the resulting text decoration color. Use the value between 0 and 255.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
Example
How to draw underline text on the newly created page.
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
gdpicturePDF.NewPDF()
gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4)
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
Dim fontResName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica)
gdpicturePDF.SetTextDecorationStyle(PdfTextDecorationStyle.Underline)
gdpicturePDF.SetTextUnderlineStyle(PdfTextUnderlineStyle.Single)
gdpicturePDF.SetTextUnderlineColor(255, 0, 0)
gdpicturePDF.SetTextUnderlineWidth(2)
gdpicturePDF.DrawRotatedText(fontResName, 100, 100, "This is rotated underlined text!", 15)
gdpicturePDF.SaveToFile("output.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
gdpicturePDF.NewPDF();
gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4);
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
string fontResName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica);
gdpicturePDF.SetTextDecorationStyle(PdfTextDecorationStyle.Underline);
gdpicturePDF.SetTextUnderlineStyle(PdfTextUnderlineStyle.Single);
gdpicturePDF.SetTextUnderlineColor(255, 0, 0);
gdpicturePDF.SetTextUnderlineWidth(2);
gdpicturePDF.DrawRotatedText(fontResName, 100, 100, "This is rotated underlined text!", 15);
gdpicturePDF.SaveToFile("output.pdf");
}
Example
How to draw underline text on the newly created page.
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
gdpicturePDF.NewPDF()
gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4)
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
Dim fontResName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica)
gdpicturePDF.SetTextDecorationStyle(PdfTextDecorationStyle.Underline)
gdpicturePDF.SetTextUnderlineStyle(PdfTextUnderlineStyle.Single)
gdpicturePDF.SetTextUnderlineColor(255, 0, 0)
gdpicturePDF.SetTextUnderlineWidth(2)
gdpicturePDF.DrawRotatedText(fontResName, 100, 100, "This is rotated underlined text!", 15)
gdpicturePDF.SaveToFile("output.pdf")
End Using
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
gdpicturePDF.NewPDF();
gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4);
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
string fontResName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica);
gdpicturePDF.SetTextDecorationStyle(PdfTextDecorationStyle.Underline);
gdpicturePDF.SetTextUnderlineStyle(PdfTextUnderlineStyle.Single);
gdpicturePDF.SetTextUnderlineColor(255, 0, 0);
gdpicturePDF.SetTextUnderlineWidth(2);
gdpicturePDF.DrawRotatedText(fontResName, 100, 100, "This is rotated underlined text!", 15);
gdpicturePDF.SaveToFile("output.pdf");
}
See Also