[Lazarus] ComparePoints func
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Wed Jul 26 17:11:23 CEST 2017
On 2017-07-26 14:54, Alexey via Lazarus wrote:
> I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here
> it's comparing x/y screen coordinates
Why not extend TPoint with an IsEquals() method, so you can do something
like
var
p1: TPoint;
p2: TPoint;
begin
// ... populate p1 & p2
if p1.IsEquals(p2) then
// do something.
ComparePoints() returning a Integer is not a very friendly return type
either, whereas Boolean makes more sense.
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the Lazarus
mailing list