Type Default Read Only Description
[C#]
XRect

[Visual Basic]
XRect
The dimensions of the current frame. No The current selection rectangle.

 

   

Notes
 

You may wish to add only a portion of an image. By changing the selection rectangle you can specify different areas to be added.

Note that this property only has an effect on an Image if the Indirect property is true (which is generally the case).

 

   

Example
 
Here we open a TIFF file using the XImage object. We add the entire image to the document and then just a portion of the image using the Selection property.

[C#]
XImage theImg = new XImage();
Doc theDoc = new Doc();
theImg.SetFile(Server.MapPath("../mypics/mypic.tif"));
theDoc.Rect.String = theImg.Selection.String;
theDoc.Rect.Magnify(0.5, 0.5);
theDoc.Rect.Position(100, 30);
theDoc.AddImageObject(theImg, false);
theImg.Selection.Inset(100, 200);
theDoc.Rect.String = theImg.Selection.String;
theDoc.Rect.Position(170, 400);
theDoc.AddImageObject(theImg, false);
theImg.Clear();
theDoc.Save(Server.MapPath("imageselect.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theImg As XImage = New XImage()
Dim theDoc As Doc = New Doc()
theImg.SetFile(Server.MapPath("../mypics/mypic.tif"))
theDoc.Rect.String = theImg.Selection.String
theDoc.Rect.Magnify(0.5, 0.5)
theDoc.Rect.Position(100, 30)
theDoc.AddImageObject(theImg, False)
theImg.Selection.Inset(100, 200)
theDoc.Rect.String = theImg.Selection.String
theDoc.Rect.Position(170, 400)
theDoc.AddImageObject(theImg, False)
theImg.Clear()
theDoc.Save(Server.MapPath("imageselect.pdf"))
theDoc.Clear()


imageselect.pdf