This method pastes an image.

[Visual Basic] Public Function PasteImage(filename As String, rect As Rectangle) As Boolean
[C#] public bool PasteImage(string filename, Rectangle rect);

Parameters

filename

The file name (full path) of the image to be pasted

rect

The Rectangle structure where the image is to be pasted

Return Value

Returns True if successful, otherwise returns False.

Explanation

The PasteImage method pastes an image.

The PasteImage's filename parameter contains the file name of the image that will be pasted. Be sure to set the full path to the image. The PasteImage's rect parameter determines the location in the ImageKit control where the image will be pasted and the size of the image. (the image is stretched to fill the rect area).

If a portion of the pasted image lies outside of the ImageKit control, the image will be resized to fit completely within the ImageKit control.

To delete the image pasted with the PasteImage method, right click on the object and display the context menu, the select "Undo" or execute the Undo method.

The PasteImage method can be used without setting the EditKind property to KindOfEdit.Image.

It is also possible to paste an image by setting the EditKind property to KindOfEdit.Polygon then, on the base image displayed in the ImageKit control, use the mouse. For more details, please refer to the Edit Overview.

Note: All images that can be loaded into the ImageKit control can also be pasted with the PasteImage method. If the selected file cannot be pasted, False will be returned. If the area set in the rect parameter is too large for the available memory to paste the image there, a small white image with a red x will appear instead. Please deleted the image object using "Delete" or "Undo" in the context menu and paste a smaller image object.

Also See

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

 

The ImageKit.NET2 is created by Newtone Corporation