Deflate(DX: Double; DY: Double);
DX. Offset by width.
DY. Offset by height.
The Deflate method decreases the real rectangle on DX by width and on DY by height.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Obj: ITabObject;
RectF: IGxRectF;
Begin
RectF:=New GxRectF.Create(0,0,Math.RandBetween(0,60.6),Math.RandBetween(0,60.36));
Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", RectF);
(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");
RectF.Deflate(10.5,13.6);
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 10.5 on width and by 13.6 on height.
See also: