Vcl.Graphics.TPicture.Assign

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Assign(Source: TPersistent); override;

C++

virtual void __fastcall Assign(System::Classes::TPersistent* Source);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TPicture

Description

Copies one object to another by copying the contents of that object to the other.

When Source is a object type that is valid for the Graphic property, Assign makes that graphic the value of the Graphic property.

The actions performed by Assign depend on the actual types of the TPicture Graphic property and Source. For example, if the Graphic property and Source are bitmaps (TBitmap), the bitmap contained in Source is copied into the Graphic property. Similar conversions are valid, for example, for TIcon or TMetafile.

If the Source parameter is not a valid object for the Graphic property, Assign calls the inherited method so that the picture can be copied from any object with which it is compatible.

See Also

Code Examples