HiPi

 view release on metacpan or  search on metacpan

lib/HiPi/Graphics/DrawingContext.pm  view on Meta::CPAN

    }
    
    # draw
    
    for my $point ( @polypoints ) {
        $self->draw_pixel( @$point, 1);
    }
}

# _point_in_polygon
# Learned from latest Math::Polygon but that isn't in Raspbian Stretch
# and we only want this single function. There are no improvements here.

sub _point_in_polygon {
    my $point = shift;
    return 0 if @_ < 3;

    my ($x, $y) = @$point;
    my $inside  = 0;

    my ($px, $py) = @{ (shift) };



( run in 1.351 second using v1.01-cache-2.11-cpan-0a6323c29d9 )