lcl: copy PixelFormat on TCustomBitmap.Assign operation

git-svn-id: trunk@33344 -
This commit is contained in:
paul 2011-11-05 16:28:40 +00:00
parent 70829434d7
commit 21ab9f3b6a
2 changed files with 11 additions and 0 deletions

View File

@ -1412,6 +1412,7 @@ type
public
constructor Create; override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
procedure FreeImage; override;
function GetResourceType: TResourceType; override;

View File

@ -63,6 +63,16 @@ begin
inherited Destroy;
end;
procedure TCustomBitmap.Assign(Source: TPersistent);
begin
inherited Assign(Source);
if Source is TCustomBitmap then
begin
FPixelFormat := TCustomBitmap(Source).FPixelFormat;
FPixelFormatNeedsUpdate := TCustomBitmap(Source).FPixelFormatNeedsUpdate;
end;
end;
function TCustomBitmap.CreateDefaultBitmapHandle(const ADesc: TRawImageDescription): HBITMAP;
var
DC: HDC;