DeflateS(Size: IGxSizeF);
Size - size, by which it is necessary to decrease.
The DeflateS method decreases the real rectangle by the size passed by the Size parameter.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Obj: ITabObject;
RectF: IGxRectF;
SizeF: IGxSizeF;
Begin
RectF:=New GxRectF.Create(0,0,Math.RandBetween(0,60.6),Math.RandBetween(0,60.36));
SizeF:=New GxSizeF.Create(Math.RandBetween(0,14),Math.RandBetween(0,14));
Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", RectF);
(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");
RectF.DeflateS(SizeF);
Obj.Rectangle:=RectF;
End Sub Button1OnClick;
After executing the example clicking the button creates an image in the regular report. The image source is the 1.bmp file. The image is created with the random size and is decreased by the random SizeF size.
See also: