Polyline.pm 308 B

12345678910111213
  1. package Slic3r::Polyline;
  2. use strict;
  3. use warnings;
  4. use Slic3r::Geometry qw(X Y);
  5. sub new_scale {
  6. my $class = shift;
  7. my @points = map { ref($_) eq 'Slic3r::Point' ? $_->pp : $_ } @_;
  8. return $class->new(map [ Slic3r::Geometry::scale($_->[X]), Slic3r::Geometry::scale($_->[Y]) ], @points);
  9. }
  10. 1;