mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 10:58:16 +02:00
LazReport, improve line object selecting, issue #16338
git-svn-id: trunk@32578 -
This commit is contained in:
parent
ce39508576
commit
f87dae15c5
@ -512,6 +512,7 @@ type
|
||||
procedure Draw(aCanvas: TCanvas); override;
|
||||
procedure DefinePopupMenu(Popup: TPopupMenu); override;
|
||||
function GetClipRgn(rt: TfrRgnType): HRGN; override;
|
||||
function PointInView(aX,aY: Integer): Boolean; override;
|
||||
|
||||
published
|
||||
property FrameColor;
|
||||
@ -4625,6 +4626,23 @@ begin
|
||||
Result := CreateRectRgn(bx - 10, by - 10, bx1 + 10, by1 + 10);
|
||||
end;
|
||||
|
||||
function TfrLineView.PointInView(aX, aY: Integer): Boolean;
|
||||
var
|
||||
bx, by, bx1, by1, w1, w2: Integer;
|
||||
begin
|
||||
if FrameStyle=frsDouble then
|
||||
w1 := Round(FrameWidth * 1.5);
|
||||
else
|
||||
w1 := Round(FrameWidth);
|
||||
|
||||
bx:=x-w1;
|
||||
by:=y-w1;
|
||||
bx1:=x+dx+w1;
|
||||
by1:=y+dy+w1;
|
||||
|
||||
Result:=(ax>=bx) and (ax<=bx1) and (ay>=by) and (ay<=by1);
|
||||
end;
|
||||
|
||||
{----------------------------------------------------------------------------}
|
||||
constructor TfrBand.Create(ATyp: TfrBandType; AParent: TfrPage);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user