X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FPolyline.pm;h=0c19f431263eb6955958afb51173067adfe38ce8;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=f982e91e661b63c0c5cab6e59aebe277ddd07b41;hpb=134d77c279c20662ad5a3e8904e71572def1478e;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set/Polyline.pm b/lib/LaTeX/TikZ/Set/Polyline.pm index f982e91..0c19f43 100644 --- a/lib/LaTeX/TikZ/Set/Polyline.pm +++ b/lib/LaTeX/TikZ/Set/Polyline.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Set::Polyline - A set object representing a possibly closed path co =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; use LaTeX::TikZ::Set::Point; @@ -102,6 +102,16 @@ LaTeX::TikZ::Interface->register( }, ); +LaTeX::TikZ::Functor->default_rule( + (__PACKAGE__) => sub { + my ($functor, $set, @args) = @_; + $set->new( + points => [ map $_->$functor(@args), $set->kids ], + closed => $set->closed, + ); + } +); + __PACKAGE__->meta->make_immutable; =head1 SEE ALSO @@ -127,7 +137,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.