Vcl.Graphics.TBitmap.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 TBitmap

Description

Copies a new bitmap image to the bitmap object.

Assign copies the bitmap image contained in Source to the bitmap object. If Source is not a bitmap, Assign calls the inherited Assign method, which can copy an image from any class that knows how to copy to a TBitmap object. If the bitmap needs to be changed, the actual bitmap image is copied before the changes are made (copy on write).

Note: An object of one type can always be assigned to another object of the same type. Also, the Source can be of type TPicture if the Graphic property of the picture is a bitmap.

See Also

Code Examples