TCustomBitmap.UnshareImage procedure
Frees the shared image in the bitmap, and creates a new one.
Declaration
procedure UnshareImage(CopyContent: Boolean); overrideArguments
CopyContent | True copies the existing content in the shared image. |
Description
UnshareImage is an overridden method used to free the shared image
in the bitmap, and create a new one. UnshareImage implements the abstract
virtual method defined in the ancestor class.
UnshareImage calls GetSharedImageClass to get the class type used
for the shared image, and creates a new instance of the class. It is cast to
TSharedCustomBitmap, and its Reference method is called
to increment the reference count for the shared image.
CopyContent indicates whether the existing image data is copied
into the new shared image instance. When set to
True, the content in
the existing shared image is copied and stored in the new shared image
instance. When set to
False, only the image descriptor in the
shared image is copied. This gets the metadata for the image.
UnshareImage calls FreeCanvasContext to free the device context
for the Canvas used in the image.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
