sub rotate { # takes as input id of obj to rot, angle to rot by, && optional x,y point to rot about instead of obj center, if possible my($self, $obid, $angl, $xfoc, $yfoc)= @_; croak "rotate: Must supply an angle -" unless(defined($angl)); my $type = $self->type($obid); # some objs need a pivot point to rotate their center around return() unless(exists($_can_rotate_about_center{$type}) || (defined($xfoc) && defined($yfoc))); $_rotate_methods{$type}->($self, $obid, $angl, $xfoc, $yfoc); }