This method draws a Stamp object within the specified rectangle.

[Visual Basic] Public Function DrawStamp(rct As System.Windows.Rect) As Boolean
[C#] public bool DrawStamp(System.Windows.Rect rct);

Parameters

rct

A rectangle of type System.Windows.Rect designating the area within which the Stamp object is drawn.

Return Value

Returns True if successful, otherwise returns False.

Explanation

This DrawStamp method draws a Stamp object within the specified rectangle. Prior to executing this method, set appropriate values in the FontName, FontSize, FontBold, FontItalic, FontStrikeout, FontUnderline, ForeColor, ForeColorOpacity, BackColor, BackColorOpacity, Border, BorderColor, BorderColorOpacity, BorderShape, Fill, PenWidth, TextAlign, VerticalText, and RightToLeft properties. Then set the text to be drawn in the Text property.

Set the coordinates for the rectangle of the text object in the DrawStamp method's rct parameter. When the DrawStamp method is executed, the text set in the Text property will be drawn within the Stamp object. 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. In this case, the extra text is not deleted and the entire text set in the Text property will be saved in the Stamp object.

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

If the coordinates set in the rct parameter are outside the image displayed in the ImageKit control and the LimitAnnotationPosition property or the LimitDrawPosition property are set to True, the text will be repositioned so the coordinate location is within the image.

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

The DrawStamp method can be used without setting the EditKind property to KindOfEdit.Stamp.

It is also possible to draw text by setting the EditKind property to KindOfEdit.Stamp 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.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation