mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 11:39:55 +02:00
Reverts define changes in lazcanvas as TFPCustomRegion is not in fpc 2.6.1
git-svn-id: trunk@36555 -
This commit is contained in:
parent
d645281057
commit
24ea04d036
@ -79,7 +79,7 @@ type
|
|||||||
FAssignedFont: TFPCustomFont;
|
FAssignedFont: TFPCustomFont;
|
||||||
FAssignedPen: TFPCustomPen;
|
FAssignedPen: TFPCustomPen;
|
||||||
FBaseWindowOrg: TPoint;
|
FBaseWindowOrg: TPoint;
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6_0)}
|
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||||
FLazClipRegion: TFPCustomRegion;
|
FLazClipRegion: TFPCustomRegion;
|
||||||
{$endif}
|
{$endif}
|
||||||
FWindowOrg: TPoint; // already in absolute coords with BaseWindowOrg summed up
|
FWindowOrg: TPoint; // already in absolute coords with BaseWindowOrg summed up
|
||||||
@ -143,7 +143,7 @@ type
|
|||||||
// because operations of SetWindowOrg inside a non-native wincontrol will be
|
// because operations of SetWindowOrg inside a non-native wincontrol will be
|
||||||
// based upon the BaseWindowOrg which is set relative to the Form canvas
|
// based upon the BaseWindowOrg which is set relative to the Form canvas
|
||||||
property BaseWindowOrg: TPoint read FBaseWindowOrg write FBaseWindowOrg;
|
property BaseWindowOrg: TPoint read FBaseWindowOrg write FBaseWindowOrg;
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6_0)}
|
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||||
property ClipRegion: TFPCustomRegion read FLazClipRegion write FLazClipRegion;
|
property ClipRegion: TFPCustomRegion read FLazClipRegion write FLazClipRegion;
|
||||||
{$endif}
|
{$endif}
|
||||||
property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg;
|
property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg;
|
||||||
@ -206,7 +206,7 @@ var
|
|||||||
begin
|
begin
|
||||||
lx := x + FWindowOrg.X;
|
lx := x + FWindowOrg.X;
|
||||||
ly := y + FWindowOrg.Y;
|
ly := y + FWindowOrg.Y;
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6_0)}
|
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||||
if Clipping and (not FLazClipRegion.IsPointInRegion(lx, ly)) then
|
if Clipping and (not FLazClipRegion.IsPointInRegion(lx, ly)) then
|
||||||
Exit;
|
Exit;
|
||||||
if (lx >= 0) and (lx < width) and (ly >= 0) and (ly < height) then
|
if (lx >= 0) and (lx < width) and (ly >= 0) and (ly < height) then
|
||||||
@ -417,7 +417,7 @@ end;
|
|||||||
procedure TLazCanvas.SetLazClipRegion(ARegion: TLazRegion);
|
procedure TLazCanvas.SetLazClipRegion(ARegion: TLazRegion);
|
||||||
begin
|
begin
|
||||||
Clipping := True;
|
Clipping := True;
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6_0)}
|
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||||
ClipRect := TLazRegionRect(ARegion.Parts.Items[0]).Rect;
|
ClipRect := TLazRegionRect(ARegion.Parts.Items[0]).Rect;
|
||||||
FLazClipRegion := ARegion;
|
FLazClipRegion := ARegion;
|
||||||
{$else}
|
{$else}
|
||||||
|
@ -41,7 +41,7 @@ type
|
|||||||
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6_0)}
|
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||||
TFPCustomRegion = class
|
TFPCustomRegion = class
|
||||||
function GetBoundingRect: TRect; virtual; abstract;
|
function GetBoundingRect: TRect; virtual; abstract;
|
||||||
function IsPointInRegion(AX, AY: Integer): Boolean; virtual; abstract;
|
function IsPointInRegion(AX, AY: Integer): Boolean; virtual; abstract;
|
||||||
|
Loading…
Reference in New Issue
Block a user