CGI-Imagemap
view release on metacpan or search on metacpan
lib/CGI/Imagemap.pm view on Meta::CPAN
# Special case.. if the Y on the bottom=0, we ignore this intersection
# (otherwise a line endpoint counts as 2 hits instead of 1)
if( $y2>$y1 ){
next if $y2==0;
}
elsif( $y1>$y2 ){
next if $y1==0;
}
else {
# Horizontal span overlaying the X axis. Consider it an intersection
# iff. it extends into the left side of the X axis
$intersections++ if ( ($x1 < 0) || ($x2 < 0) );
next;
}
# We know line must intersect the X axis, so see where
$dx = $x2 - $x1;
# Special case.. if a vertical line, it intersects
unless ( $dx ) {
( run in 0.371 second using v1.01-cache-2.11-cpan-49f99fa48dc )