mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 08:47:59 +02:00
LCL: TLazIntfImage.Assign: copy DataDescription
git-svn-id: trunk@52005 -
This commit is contained in:
parent
5d6e5012ea
commit
de6e0945f8
@ -232,6 +232,7 @@ type
|
||||
constructor Create(ARawImage: TRawImage; ADataOwner: Boolean);
|
||||
constructor CreateCompatible(IntfImg: TLazIntfImage; AWidth, AHeight: integer);
|
||||
destructor Destroy; override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate;
|
||||
procedure SetSize(AWidth, AHeight: integer); override;
|
||||
@ -3458,6 +3459,21 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TLazIntfImage.Assign(Source: TPersistent);
|
||||
var
|
||||
Src: TLazIntfImage;
|
||||
Desc: TRawImageDescription;
|
||||
begin
|
||||
if Source is TLazIntfImage then begin
|
||||
Src:=TLazIntfImage(Source);
|
||||
Desc:=Src.DataDescription;
|
||||
Desc.Width:=0; // avoid side effects
|
||||
Desc.Height:=0; // avoid side effects
|
||||
DataDescription:=Src.DataDescription;
|
||||
end;
|
||||
inherited Assign(Source);
|
||||
end;
|
||||
|
||||
procedure TLazIntfImage.AlphaFromMask(AKeepAlpha: Boolean);
|
||||
var
|
||||
x, y, xStop, yStop: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user