X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet.pm;h=5b80633d66a9ea3f6305ef70c3e4bba73c77659e;hb=HEAD;hp=e673097ec2f20e7a9349e8cabff8cdef3cfb84c3;hpb=4ec204cfd114d9ce19fd616f093503c971b00a1f;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set.pm b/lib/LaTeX/TikZ/Set.pm index e673097..5b80633 100644 --- a/lib/LaTeX/TikZ/Set.pm +++ b/lib/LaTeX/TikZ/Set.pm @@ -9,18 +9,18 @@ LaTeX::TikZ::Set - Base role for LaTeX::TikZ set objects. =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; use LaTeX::TikZ::Context; use LaTeX::TikZ::Scope; use LaTeX::TikZ::Tools; -use Any::Moose 'Role'; +use Mouse::Role; =head1 ATTRIBUTES @@ -61,7 +61,9 @@ requires qw< draw >; -=head2 C +=head2 C + + $set->mod(@mods) Apply the given list of L objects to the current set. @@ -94,15 +96,18 @@ around 'draw' => sub { my @mods = $cxt->effective_mods; if (@mods) { - $body = LaTeX::TikZ::Scope->new - ->mod(map $_->apply($tikz), @mods) - ->body($body); + $body = LaTeX::TikZ::Scope->new( + mods => [ map $_->apply($tikz), @mods ], + body => $body, + ); } $body; }; -=head2 C +=head2 C + + $set->layer($layer) Puts the current set in the corresponding layer. This is a shortcut for C<< $set->mod(Tikz->layer($layer)) >>. @@ -121,7 +126,9 @@ sub layer { ) } -=head2 C +=head2 C + + $set->clip($path) Clips the current set by the path given by C<$path>. This is a shortcut for C<< $set->mod(Tikz->clip($path)) >>. @@ -163,7 +170,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2010 Vincent Pit, all rights reserved. +Copyright 2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.