Fix one more centering problem caused by wrong bounding box implementation

This commit is contained in:
Alessandro Ranellucci 2013-06-15 15:50:02 +02:00
parent a8981b8b35
commit 7bf308c08f
3 changed files with 14 additions and 19 deletions

View file

@ -156,11 +156,12 @@ sub translate {
sub scale {
my $self = shift;
my ($factor) = @_;
return if $factor == 1;
# transform point coordinates
foreach my $point (@$self) {
$point->[$_] *= $factor for X,Y;
if ($factor != 1) {
foreach my $point (@$self) {
$point->[$_] *= $factor for X,Y;
}
}
return $self;
}