| ImageGear Professional v18.2 > API Reference Guide > View Component API Reference > View Component Objects > IGPageViewCtl Control > IGPageViewCtl Methods > DrawText Method |
Draws text over the image.Use this method in IGPageViewCtl control's AfterDraw event to draw text over the image.
DrawText (hDC As Long, TextToDraw As String, RGBColor As
IGPixel, FontName As String, lFontHeight As Long, Location As
IGRectangle, nTextAlign As enumIGViewDrawTextAlign, lTabSize As
Long, dLineSpacing As Double)
| Name | Description |
|---|---|
| hDC | Device context to which to draw. |
| TextToDraw | Text string to draw. |
| RGBColor | Text color to use. Only RGB mode is supported. |
| FontName | Text font name to use. |
| lFontHeight | Text font height to use. |
| Location | Text location coordinates. |
| nTextAlign | Text align mode to use. One of enumIGViewDrawTextAlign values. |
| lTabSize | Tab size in device units. |
| dLineSpacing | Line space size in device units. |
N/A
N/A
None
|
Copy Code
|
|
|---|---|
Private Sub IGPageViewCtl1_AfterDraw(ByVal hDC As Long)
Dim location As IGRectangle
Set location = IGCoreCtl1.CreateObject(IG_OBJ_RECTANGLE)
location.Left = 0
location.Top = 0
location.Right = 100
location.Bottom = 100
Dim rgbColor As IGPixel
Set rgbColor = IGCoreCtl1.CreateObject(IG_OBJ_PIXEL)
rgbColor.RGB_R = 0
rgbColor.RGB_G = 0
rgbColor.RGB_B = 255
IGPageViewCtl1.DrawText hDC, "Text", rgbColor, "Verdana",
12, location, _
IG_VIEW_DRAW_TEXT_LEFT, 10, 4
End Sub
|
|