Bugfix in utils/pdf-slices.pl, wrong shift caused slices to be outside the media box

This commit is contained in:
Alessandro Ranellucci 2014-04-11 19:55:15 +02:00
parent 26bdbf0210
commit f9661b02a6
2 changed files with 37 additions and 14 deletions

View file

@ -218,6 +218,17 @@ sub center_instances_around_point {
}
}
sub align_instances_to_origin {
my ($self) = @_;
my $bb = $self->bounding_box;
return if !defined $bb;
my $new_center = $bb->size;
$new_center->translate(-$new_center->x/2, -$new_center->y/2); #//
$self->center_instances_around_point($new_center);
}
sub translate {
my $self = shift;
my @shift = @_;