From: Vincent Pit Date: Fri, 23 Jul 2010 13:51:31 +0000 (+0200) Subject: Fix synopsis X-Git-Tag: v0.02~33 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c4157a9cddd2f9728334269b47557be551c9d6de;p=perl%2Fmodules%2FLaTeX-TikZ.git Fix synopsis --- diff --git a/lib/LaTeX/TikZ.pm b/lib/LaTeX/TikZ.pm index c91ea8c..0e7a62d 100644 --- a/lib/LaTeX/TikZ.pm +++ b/lib/LaTeX/TikZ.pm @@ -21,7 +21,7 @@ our $VERSION = '0.01'; # A couple of lines my $hline = Tikz->line(-1 => 1); - my $vline = Tikz->line([ 0, -1 ] => [ 0, -1 ]); + my $vline = Tikz->line([ 0, -1 ] => [ 0, 1 ]); # Paint them in red $_->mod(Tikz->color('red')) for $hline, $vline; @@ -36,10 +36,10 @@ our $VERSION = '0.01'; $octo->clip(Tikz->rectangle(-0.5*(1+i), 2*(1+i))); # Fill it with dots - $octo->mod(Tikz->pattern(class => 'Dots')); + $octo->mod(Tikz->pattern(class => 'Dots', space_width => 10)); # Create a formatter object - my $tikz = Tikz->formatter; + my $tikz = Tikz->formatter(scale => 5); # Put those objects all together and print them my $seq = Tikz->seq($octo, $hline, $vline); diff --git a/samples/synopsis.pl b/samples/synopsis.pl index 892e8bb..c5ab5fd 100644 --- a/samples/synopsis.pl +++ b/samples/synopsis.pl @@ -9,7 +9,7 @@ use LaTeX::TikZ; # A couple of lines my $hline = Tikz->line(-1 => 1); -my $vline = Tikz->line([ 0, -1 ] => [ 0, -1 ]); +my $vline = Tikz->line([ 0, -1 ] => [ 0, 1 ]); # Paint them in red $_->mod(Tikz->color('red')) for $hline, $vline; @@ -24,10 +24,10 @@ my $octo = Tikz->closed_polyline( $octo->clip(Tikz->rectangle(-0.5*(1+i), 2*(1+i))); # Fill it with dots -$octo->mod(Tikz->pattern(class => 'Dots')); +$octo->mod(Tikz->pattern(class => 'Dots', space_width => 10)); # Create a formatter object -my $tikz = Tikz->formatter; +my $tikz = Tikz->formatter(scale => 5); # Put those objects all together and print them my $seq = Tikz->seq($octo, $hline, $vline);