X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FOp.pm;h=6d93d028ec4c8aedbee1edca0c69bd6a4da83b88;hb=f54cadb836315572aa2c4bcb16f221da1687df7a;hp=c7f7e1b96f9dbd5320beaa54d47b5000987175dd;hpb=93bfe14caec156fc11587863a486220b986b6b2e;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set/Op.pm b/lib/LaTeX/TikZ/Set/Op.pm index c7f7e1b..6d93d02 100644 --- a/lib/LaTeX/TikZ/Set/Op.pm +++ b/lib/LaTeX/TikZ/Set/Op.pm @@ -9,27 +9,64 @@ LaTeX::TikZ::Set::Op - A role for set objects that can be part of a path. =head1 VERSION -Version 0.01 +Version 0.02 =cut -our $VERSION = '0.01'; +our $VERSION = '0.02'; -use LaTeX::TikZ::Scope; +=head1 DESCRIPTION + +Ops are the components of a path. +They can be built together to form a path. +Thus, they are all the elements against which we can call the C method. + +=cut use Any::Moose 'Role'; +=head1 RELATIONSHIPS + +This role consumes the L role, and as such implements the L method. + +=cut + +with 'LaTeX::TikZ::Set'; + +=head1 METHODS + +This method is required by the interface : + +=over 4 + +=item * + +C + +Returns the TikZ code that builds a path out of the current set object as a string formatted by the L object C<$formatter>. + +=back + +=cut + requires qw( path ); +=head2 C + +=cut + sub draw { my $set = shift; - LaTeX::TikZ::Scope->new - ->body([ "\\draw " . $set->path(@_) . ' ;' ]); + [ "\\draw " . $set->path(@_) . ' ;' ]; } +=head1 SEE ALSO + +L, L. + =head1 AUTHOR Vincent Pit, C<< >>, L.