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
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to