XS interface completed, including new Line class

This commit is contained in:
Alessandro Ranellucci 2013-07-15 22:57:22 +02:00
parent 9af2a1c007
commit ab6b3d41a7
33 changed files with 435 additions and 257 deletions

View file

@ -13,11 +13,10 @@ my $square = [ # ccw
[100, 200],
];
my $polygon = Slic3r::Polygon::XS->new(@$square);
is_deeply [ @{$polygon->arrayref_pp} ], [ @$square ], 'polygon roundtrip';
my $polygon = Slic3r::Polygon->new(@$square);
is_deeply [ @{$polygon->pp} ], [ @$square ], 'polygon roundtrip';
my $arrayref = $polygon->arrayref;
isa_ok $arrayref, 'Slic3r::Polygon', 'Perl polygon is blessed';
isa_ok $arrayref->[0], 'Slic3r::Point', 'Perl points are blessed';
is ref($polygon->arrayref), 'ARRAY', 'polygon arrayref is unblessed';
isa_ok $polygon->[0], 'Slic3r::Point', 'polygon point is blessed';
__END__