From: Vincent Pit Date: Thu, 22 Jul 2010 19:07:17 +0000 (+0200) Subject: Make some accessors writable for the formatter object X-Git-Tag: v0.01~14 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=71e1955831ab58cb00222af090f85f01516d0cca;p=perl%2Fmodules%2FLaTeX-TikZ.git Make some accessors writable for the formatter object --- diff --git a/lib/LaTeX/TikZ/Formatter.pm b/lib/LaTeX/TikZ/Formatter.pm index aa26ebc..6f3d56e 100644 --- a/lib/LaTeX/TikZ/Formatter.pm +++ b/lib/LaTeX/TikZ/Formatter.pm @@ -17,6 +17,8 @@ our $VERSION = '0.01'; use Sub::Name (); +use LaTeX::TikZ::Point; + use LaTeX::TikZ::Interface; use LaTeX::TikZ::Tools; @@ -37,23 +39,23 @@ has 'format' => ( ); has 'scale' => ( - is => 'ro', + is => 'rw', isa => 'Num', default => 1, ); has 'width' => ( - is => 'ro', + is => 'rw', isa => 'Maybe[Num]', ); has 'height' => ( - is => 'ro', + is => 'rw', isa => 'Maybe[Num]', ); has 'origin' => ( - is => 'ro', + is => 'rw', isa => 'Maybe[LaTeX::TikZ::Point::Autocoerce]', coerce => 1, ); @@ -115,9 +117,6 @@ sub render { my (@layers, @other_mods); $find_mods->($seq, \@layers, \@other_mods); - my $o = $tikz->origin; - $seq = $seq->translate($o) if defined $o; - my $w = $tikz->width; my $h = $tikz->height; my $canvas = '';