Recent

Author Topic: function intersect in lazmapviewer  (Read 343 times)

Sukram

  • Newbie
  • Posts: 1
function intersect in lazmapviewer
« on: February 06, 2026, 07:42:17 pm »
Hello, how do I use the `intersect` function in LazMapViewer? I want to find the point where two lines intersect. Is this function suitable for that, and could I get some example code?

thank you

wp

  • Hero Member
  • *****
  • Posts: 13412
Re: function intersect in lazmapviewer
« Reply #1 on: February 06, 2026, 08:30:39 pm »
You mean this one (in unit mvDrawingEngine)?

Code: Pascal  [Select][+][-]
  1. // Intersection point between line segments <P1, P2> and <P3, P4>
  2. // Returns:
  3. //   0 - collinear line segments
  4. //   1 - line segments intersect at PX
  5. //   2 - collinear overlapping line segments, PX lies on both
  6. //
  7. function Intersect(P1, P2, P3, P4: TPoint; out PX: TPoint): Integer;  

 

TinyPortal © 2005-2018