mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:29:23 +02:00
* fix from Werner P. Setter for clipregion to fix memory leak.
resolves #40232
This commit is contained in:
parent
11a390117c
commit
facf28fb29
@ -268,6 +268,13 @@ begin
|
|||||||
FPenPos:=AValue;
|
FPenPos:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPCustomCanvas.SetClipRegion(const AValue: TFPCustomRegion);
|
||||||
|
begin
|
||||||
|
if AValue = FClipRegion then exit;
|
||||||
|
FClipRegion.Free;
|
||||||
|
FClipRegion := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
function TFPCustomCanvas.DoAllowPen (APen : TFPCustomPen) : boolean;
|
function TFPCustomCanvas.DoAllowPen (APen : TFPCustomPen) : boolean;
|
||||||
begin
|
begin
|
||||||
result := false;
|
result := false;
|
||||||
|
@ -284,6 +284,7 @@ type
|
|||||||
function GetClipping: boolean; virtual;
|
function GetClipping: boolean; virtual;
|
||||||
procedure SetClipping(const AValue: boolean); virtual;
|
procedure SetClipping(const AValue: boolean); virtual;
|
||||||
procedure SetPenPos(const AValue: TPoint); virtual;
|
procedure SetPenPos(const AValue: TPoint); virtual;
|
||||||
|
procedure SetClipRegion(const AValue: TFPCustomRegion);
|
||||||
procedure DoLockCanvas; virtual;
|
procedure DoLockCanvas; virtual;
|
||||||
procedure DoUnlockCanvas; virtual;
|
procedure DoUnlockCanvas; virtual;
|
||||||
procedure DoTextOut (x,y:integer;text:string); virtual; abstract;
|
procedure DoTextOut (x,y:integer;text:string); virtual; abstract;
|
||||||
@ -384,7 +385,7 @@ type
|
|||||||
property Interpolation : TFPCustomInterpolation read FInterpolation write FInterpolation;
|
property Interpolation : TFPCustomInterpolation read FInterpolation write FInterpolation;
|
||||||
property Colors [x,y:integer] : TFPColor read GetColor write SetColor;
|
property Colors [x,y:integer] : TFPColor read GetColor write SetColor;
|
||||||
property ClipRect : TRect read GetClipRect write SetClipRect;
|
property ClipRect : TRect read GetClipRect write SetClipRect;
|
||||||
property ClipRegion : TFPCustomRegion read FClipRegion write FClipRegion;
|
property ClipRegion : TFPCustomRegion read FClipRegion write SetClipRegion;
|
||||||
property Clipping : boolean read GetClipping write SetClipping;
|
property Clipping : boolean read GetClipping write SetClipping;
|
||||||
property PenPos : TPoint read FPenPos write SetPenPos;
|
property PenPos : TPoint read FPenPos write SetPenPos;
|
||||||
property Height : integer read GetHeight write SetHeight;
|
property Height : integer read GetHeight write SetHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user