aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Perl/demos/Tk/demos/zinc_contrib_lib/TripleRotatingWheel.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/Perl/demos/Tk/demos/zinc_contrib_lib/TripleRotatingWheel.pl b/Perl/demos/Tk/demos/zinc_contrib_lib/TripleRotatingWheel.pl
index c0c1372..42bb2d1 100644
--- a/Perl/demos/Tk/demos/zinc_contrib_lib/TripleRotatingWheel.pl
+++ b/Perl/demos/Tk/demos/zinc_contrib_lib/TripleRotatingWheel.pl
@@ -435,6 +435,11 @@ sub _clipAndTranslate {
$x = 0 unless $x;
$y = 0 unless $y;
$self->{widget}->scale($self->{itemclip}, $shrinkfactor, $shrinkfactor);
- $self->{widget}->translate($self->{topgroup}, $x, $y);
+ if ($Tk::Zinc::VERSION lt "3.297") {
+ $self->{widget}->translate($self->{topgroup}, $x, $y);
+ } else {
+ my ($xc, $yc) = $self->{widget}->coords($self->{topgroup});
+ $self->{widget}->coords($self->{topgroup}, [$xc + $x, $yc + $y]);
+ }
}
1;