You've already forked lazarus-ccr
mbControls: Refactoring of the 2D gradients and code used in several units over again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5461 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -8,6 +8,7 @@ uses
|
||||
Classes, SysUtils;
|
||||
|
||||
procedure Clamp(var AValue:Integer; AMin, AMax: Integer);
|
||||
function PointInCircle(p: TPoint; Size: integer): boolean;
|
||||
|
||||
implementation
|
||||
|
||||
@@ -17,6 +18,14 @@ begin
|
||||
if AValue > AMax then AValue := AMax;
|
||||
end;
|
||||
|
||||
function PointInCircle(p: TPoint; Size: integer): boolean;
|
||||
var
|
||||
r: integer;
|
||||
begin
|
||||
r := size div 2;
|
||||
Result := (sqr(p.x - r) + sqr(p.y - r) <= sqr(r));
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
Reference in New Issue
Block a user