From: Vincent Pit Date: Sun, 18 Jul 2010 17:11:46 +0000 (+0200) Subject: Call LaTeX::TikZ::Set::Rectangle explicitely in the formatter X-Git-Tag: v0.01~46 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=597f5e5c66c1b4052fd8f817205cd28b752c4afa;p=perl%2Fmodules%2FLaTeX-TikZ.git Call LaTeX::TikZ::Set::Rectangle explicitely in the formatter --- diff --git a/lib/LaTeX/TikZ/Formatter.pm b/lib/LaTeX/TikZ/Formatter.pm index da0656c..18abe13 100644 --- a/lib/LaTeX/TikZ/Formatter.pm +++ b/lib/LaTeX/TikZ/Formatter.pm @@ -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}"; }