GxIcon.CreateCopy

Fore Syntax

CreateCopy(Icon: IGxIcon; Size: IGxSize);

Fore.NET Syntax

CreateCopy(Icon: Prognoz.Platform.Interop.Drawing.GxIcon; Size: Prognoz.Platform.Interop.Drawing.GxSize);

Parameters

Icon. The icon that should be copied.

Size. Parameters, in accordance with which the icon is scaled.

Description

The CreateCopy constructor creates an icon copy and scales it to the sizes specified in the Size sizes parameter.

Fore Example

Function GetIconCopy(SourceIcon: IGxIcon): IGxIcon;
Var
    IconSize, NewSize: IGxSize;
    DestinationIcon: IGxIcon;
Begin
    IconSize := SourceIcon.Size;
    NewSize := New GxSize.Create(IconSize.Width * 2, IconSize.Height * 2);
    DestinationIcon := New GxIcon.CreateCopy(SourceIcon, NewSize);
    Return DestinationIcon;
End Function GetIconCopy;

The function returns the copy of the icon passed as an input parameter, doubled in size.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetIconCopy(SourceIcon: GxIcon): GxIcon;
Var
    IconSize, NewSize: GxSize;
    DestinationIcon: GxIcon = New GxIconClass();
Begin
    IconSize := SourceIcon.Size;
    NewSize := New GxSizeClass();
    NewSize.Create(IconSize.Width * 2, IconSize.Height * 2);
    DestinationIcon.CreateCopy(SourceIcon, NewSize);
    Return DestinationIcon;
End Function;

The function returns the copy of the icon passed as an input parameter, doubled in size.

See also:

GxIcon