lcl: add TBitmap.ReleaseMaskHandle by analogy with TBitmap.ReleaseHandle

git-svn-id: trunk@13198 -
This commit is contained in:
paul 2007-12-07 07:14:22 +00:00
parent 87c4e64232
commit 5c61bf6aaa
3 changed files with 14 additions and 0 deletions

View File

@ -1086,6 +1086,7 @@ type
procedure FreeHandle; override;
procedure FreeMaskHandle;
function ReleaseHandle: HBITMAP;
function ReleaseMaskHandle: HBITMAP;
function IsEmpty: boolean;
function GetPixelFormat: TPixelFormat;
public
@ -1198,6 +1199,7 @@ type
procedure ReadStream(Stream: TStream; UseSize: boolean; Size: Longint); virtual;
procedure WriteStream(Stream: TStream; WriteSize: Boolean); virtual;
function ReleaseHandle: HBITMAP;
function ReleaseMaskHandle: HBITMAP;
function ReleasePalette: HPALETTE;
class function GetFPReaderForFileExt(
const FileExtension: string): TFPCustomImageReaderClass; override;

View File

@ -1096,6 +1096,12 @@ begin
Result := FImage.ReleaseHandle;
end;
function TBitmap.ReleaseMaskHandle: HBITMAP;
begin
FreeCanvasContext;
Result := FImage.ReleaseMaskHandle;
end;
function TBitmap.ReleasePalette: HPALETTE;
begin
// ToDo

View File

@ -81,6 +81,12 @@ begin
FHandle:=0;
end;
function TBitmapImage.ReleaseMaskHandle: HBITMAP;
begin
Result := FMaskHandle;
FMaskHandle := 0;
end;
function TBitmapImage.IsEmpty: boolean;
begin
Result := (FHandle = 0) and (FDIBHandle = 0)