Declaration¶
Source position: bitmapresource.pp line 36
type
TBitmapResource = class(TAbstractResource)
protected
function GetType : TResourceDesc;
function GetName : TResourceDesc;
function ChangeDescTypeAllowed : Boolean;
function ChangeDescValueAllowed : Boolean;
procedure NotifyResourcesLoaded;
public
constructor Create;
constructor Create(aType: TResourceDesc; aName: TResourceDesc);
destructor Destroy;
procedure UpdateRawData;
procedure SetCustomBitmapDataStream;
property BitmapData: TStream; {r}
end;
Inheritance¶
Description¶
This class represents a resource of type RT_BITMAP.
A bitmap resource contents is very similar to a BMP file. However some differences exists, so RawData is not appropriate if you need to read and write BMP data. Instead, BitmapData property gives access to a BMP file-like stream.
Remark:
This class doesn't allow its type to be changed to anything else than RT_BITMAP. Attempts to do so result in a EResourceDescChangeNotAllowedException.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| BitmapData read only | public | Resource data as a BMP stream |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| ChangeDescTypeAllowed | protected | |
| ChangeDescValueAllowed | protected | |
| Create | public | Creates a new bitmap resource |
| Destroy | public | |
| GetName | protected | |
| GetType | protected | |
| NotifyResourcesLoaded | protected | |
| SetCustomBitmapDataStream | public | Sets a custom stream as the underlying stream for BitmapData |
| UpdateRawData | public |
See also¶
| Name | Description |
|---|---|
| BitmapData | Resource data as a BMP stream |
| TAbstractResource.RawData | The raw resource data stream |