function (x0, y0, x1, y1, x2, y2, x3, y3)
	{
		var denom = ((y3 - y2) * (x1 - x0)) - ((x3 - x2) * (y1 - y0));
		var nume_a = ((x3 - x2) * (y0 - y2)) - ((y3 - y2) * (x0 - x2));
		var nume_b = ((x1 - x0) * (y0 - y2)) - ((y1 - y0) * (x0 - x2));

		var ua = nume_a / denom;
		var ub = nume_b / denom;
		
		if(ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0)
		{
			// Get the intersection point
			var x = x0 + ua * (x1 - x0);
			var y = y0 + ua * (y1 - y0);
			
			return new mxPoint(x, y);
		}
		
		// No intersection
		return null;
	}
function (x0, y0, x1, y1, x2, y2, x3, y3)
	{
		var denom = ((y3 - y2) * (x1 - x0)) - ((x3 - x2) * (y1 - y0));
		var nume_a = ((x3 - x2) * (y0 - y2)) - ((y3 - y2) * (x0 - x2));
		var nume_b = ((x1 - x0) * (y0 - y2)) - ((y1 - y0) * (x0 - x2));

		var ua = nume_a / denom;
		var ub = nume_b / denom;
		
		if(ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0)
		{
			// Get the intersection point
			var x = x0 + ua * (x1 - x0);
			var y = y0 + ua * (y1 - y0);
			
			return new mxPoint(x, y);
		}
		
		// No intersection
		return null;
	}
function ( x0 , y0 , x1 , y1 , x2 , y2 , x3 , y3 ) { var denom = ( ( y3 - y2 ) * ( x1 - x0 ) ) - ( ( x3 - x2 ) * ( y1 - y0 ) ) ; var nume_a = ( ( x3 - x2 ) * ( y0 - y2 ) ) - ( ( y3 - y2 ) * ( x0 - x2 ) ) ; var nume_b = ( ( x1 - x0 ) * ( y0 - y2 ) ) - ( ( y1 - y0 ) * ( x0 - x2 ) ) ; var ua = nume_a / denom ; var ub = nume_b / denom ; if ( ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0 ) { // Get the intersection point var x = x0 + ua * ( x1 - x0 ) ; var y = y0 + ua * ( y1 - y0 ) ; return new mxPoint ( x , y ) ; } // No intersection return null ; }
Function: intersection

Returns the intersection of two lines as an <mxPoint>.

Parameters:

x0 - X-coordinate of the first line's startpoint.
y0 - X-coordinate of the first line's startpoint.
x1 - X-coordinate of the first line's endpoint.
y1 - Y-coordinate of the first line's endpoint.
x2 - X-coordinate of the second line's startpoint.
y2 - Y-coordinate of the second line's startpoint.
x3 - X-coordinate of the second line's endpoint.
y3 - Y-coordinate of the second line's endpoint.
Function : intersection
Returns the intersection point of two points