Reduce(DX: Integer, DY: Integer);
DX. Offset by width.
DY. Offset by height.
The Reduce method decreases the current size.
The size is determined with integer values.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Size: IGxSize;
Rect: IWxRectangle;
Begin
Size:=New GxSize.Create(10,10);
Rect:=UiWorkspace1.WxWorkspace.CreateRectangle;
Rect.BeginUpdate;
Size.Reduce(40,45);
Rect.Size:=New GxSizeF.CreateFromSize(Size.ToSizeF);
Rect.EndUpdate;
End Sub Button1OnClick;
After executing the example clicking the button creates a rectangle in the workspace, and its size is reduced by 40 on width and by 45 on height.
See also: