mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 21:19:26 +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;
|
||||
end;
|
||||
|
||||
procedure TFPCustomCanvas.SetClipRegion(const AValue: TFPCustomRegion);
|
||||
begin
|
||||
if AValue = FClipRegion then exit;
|
||||
FClipRegion.Free;
|
||||
FClipRegion := AValue;
|
||||
end;
|
||||
|
||||
function TFPCustomCanvas.DoAllowPen (APen : TFPCustomPen) : boolean;
|
||||
begin
|
||||
result := false;
|
||||
|
@ -284,6 +284,7 @@ type
|
||||
function GetClipping: boolean; virtual;
|
||||
procedure SetClipping(const AValue: boolean); virtual;
|
||||
procedure SetPenPos(const AValue: TPoint); virtual;
|
||||
procedure SetClipRegion(const AValue: TFPCustomRegion);
|
||||
procedure DoLockCanvas; virtual;
|
||||
procedure DoUnlockCanvas; virtual;
|
||||
procedure DoTextOut (x,y:integer;text:string); virtual; abstract;
|
||||
@ -384,7 +385,7 @@ type
|
||||
property Interpolation : TFPCustomInterpolation read FInterpolation write FInterpolation;
|
||||
property Colors [x,y:integer] : TFPColor read GetColor write SetColor;
|
||||
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 PenPos : TPoint read FPenPos write SetPenPos;
|
||||
property Height : integer read GetHeight write SetHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user