Sign in Join
FPDoc Onlineexperiment

TCustomBitmap.LazarusResourceTypeValid function

Member of TCustomBitmappublicIn unit Graphics

Determines if the specified resource type is valid for the image format.

Declaration

pascal
function LazarusResourceTypeValid(const ResourceType: string): Boolean
 ; override

Arguments

ResourceType

The resource type examined in the method.

Function result

Returns True if the resource type is valid for the image format.

Description

LazarusResourceTypeValid is a Boolean function used to determine if the value in ResourceType is a valid resource type for the image format.

LazarusResourceTypeValid is an overridden method in TCustomBitmap, and re-implements the method defined in the ancestor class. The return value is True when ResourceType contains one of the values:

'BMP'
Bitmap resource type.
'BITMAP'
Bitmap resource type.
'XPM'
Pixmap resource type.

Case is not significant for the value in ResourceType; it is converted to uppercase prior to checking its value.

The return value is False if ResourceType contains any other value.

LazarusResourceTypeValid is used in the implementation of the LoadFromLazarusResource method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.