This method draws text within the specified rectangle.

[Visual Basic] As Boolean Public Function DrawText(rct As RectangleF)
[C#] public bool DrawText(RectangleF rct);

Parameters

rct

The RectangleF structure designating the area within which the text is drawn.

Return Value

Returns True if successful, otherwise returns False.

Explanation

This DrawText method draws text within the specified rectangle. Prior to executing this method, set appropriate values in the FontName, FontSize, FontBold, FontItalic, FontStrikeout, FontUnderline, ForeColor, BackColor, and Fill properties.

Set the coordinates for the rectangle of the text object in the DrawText method's rct parameter. When the DrawText method is executed, the text set in the Text property will be drawn within that rectangle. Text will automatically be word-wrapped to fit within the rectangle. If the text is too long for the specified rectangle, the latter part of the text will not be drawn.

This method will draw text, irrespective of the EditKind and WordWrap property values.

If the coordinates set in the rct parameter lie outside the ImageKit control, the text will be resized to fit  completely within the ImageKit control.

To delete the text drawn with the DrawText method, right click the object and display the context menu, the select "Undo" or execute the Undo method.

The DrawText method can be used without setting the EditKind property to KindOfEdit.Text.

It is also possible to draw text by setting the EditKind property to KindOfEdit.Text then, on the base image displayed in the ImageKit control, use the mouse and keyboard. For more details, please refer to the Edit Overview.

See also

ImageKit.Edit Members | Newtone.ImageKit.Win.ImageKit

 

The ImageKit.NET2 is created by Newtone Corporation