]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/commitdiff
Call LaTeX::TikZ::Set::Rectangle explicitely in the formatter
authorVincent Pit <vince@profvince.com>
Sun, 18 Jul 2010 17:11:46 +0000 (19:11 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 18 Jul 2010 17:11:46 +0000 (19:11 +0200)
lib/LaTeX/TikZ/Formatter.pm

index da0656c288fbe4bf358bc4e6066d6b4ca8cc98eb..18abe13ef5ec872547aed19fd8f39de70f255db5 100644 (file)
@@ -97,7 +97,12 @@ sub render {
  my $h = $tikz->height;
  my $canvas = '';
  if (defined $w and defined $h) {
-  $seq->clip(Tikz->rectangle(Tikz->point(0) => [ $w, $h ]));
+  require LaTeX::TikZ::Set::Rectangle;
+  $seq->clip(LaTeX::TikZ::Set::Rectangle->new(
+   from   => 0,
+   width  => $w,
+   height => $h,
+  ));
   $_ = $tikz->len($_) for $w, $h;
   $canvas = ",papersize={$w,$h},body={$w,$h}";
  }