GxRect.CreateFromRect

Fore Syntax

CreateFromRect(Rect: IGxRect);

Fore.NET Syntax

CreateFromRect(Rect: Prognoz.Platform.Interop.Drawing.GxRect);

Parameters

Rect. The rectangle that is used to create a new rectangle.

Description

The CreateFromRect constructor creates a new rectangle that is the copy of the rectangle passed by the Rect parameter.

Fore Example

Function GetCopyRect(SourceRect: IGxRect): IGxRect;
Var
    DestinationRect: IGxRect;
Begin
    DestinationRect := New GxRect.CreateFromRect(SourceRect);
    Return DestinationRect;
End Function GetCopyRect;

This function returns the copy of the rectangle passed as an input parameter.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetCopyRect(SourceRect: GxRect): GxRect;
Var
    DestinationRect: GxRect = New GxRectClass();
Begin
    DestinationRect.CreateFromRect(SourceRect);
    Return DestinationRect;
End Function;

This function returns the copy of the rectangle passed as an input parameter.

See also:

GxRect