CreateFromStreamS(Stream: IIOStream; Size: IGxSize);
Stream. Stream, from which the icon is loaded.
Size. The sizes, according to which the icon is scaled.
The CreateFromStreamS constructor creates an icon from the stream scaling it to the sizes specified in the Size sizes parameter.
Function GetScalingIconFromStream(IconStream: IIOStream; SWidth: Integer; SHeight: Integer): IGxIcon;
Var
ScalingSize: IGxSize;
OutIcon: IGxIcon;
Begin
If IconStream.Size <> 0 Then
ScalingSize := New GxSize.Create(SWidth, SHeight);
OutIcon := New GxIcon.CreateFromStreamS(IconStream, ScalingSize);
Return OutIcon;
Else
Return Null;
End If;
End Function GetScalingIconFromStream;
The function returns the icon obtained from the stream and scaled in accordance with the specified sizes.
See also: