mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 13:09:20 +02:00
Further adjusts lazregions to the new TFPCustomRegion
git-svn-id: trunk@34025 -
This commit is contained in:
parent
2e54189582
commit
c70c69b953
@ -10,7 +10,7 @@ unit lazregions;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils;
|
Classes, SysUtils, fpcanvas;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ type
|
|||||||
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TLazRegion = class
|
TLazRegion = class{$if defined(ver2_7) or defined(ver2_8) or defined(ver2_9)}(TFPCustomRegion){$endif}
|
||||||
public
|
public
|
||||||
// The parts of a region should all be inside valid areas of the region
|
// The parts of a region should all be inside valid areas of the region
|
||||||
// so if a combination operation removes some areas of the region, then
|
// so if a combination operation removes some areas of the region, then
|
||||||
@ -42,7 +42,8 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure AddRectangle(ARect: TRect);
|
procedure AddRectangle(ARect: TRect);
|
||||||
procedure SetAsSimpleRectRegion(ARect: TRect);
|
procedure SetAsSimpleRectRegion(ARect: TRect);
|
||||||
function IsPointInRegion(AX, AY: Integer): Boolean; virtual;
|
function GetBoundingRect: TRect; {$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}virtual;{$else}override;{$endif}
|
||||||
|
function IsPointInRegion(AX, AY: Integer): Boolean; {$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}virtual;{$else}override;{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ This is a region which can hold other region holders inside it }
|
{ This is a region which can hold other region holders inside it }
|
||||||
@ -161,6 +162,11 @@ begin
|
|||||||
Rect := ARect;
|
Rect := ARect;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TLazRegion.GetBoundingRect: TRect;
|
||||||
|
begin
|
||||||
|
Result := Rect;
|
||||||
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
Checks if a point is inside this region
|
Checks if a point is inside this region
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user