X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FMod%2FClip.pm;h=a0b0b8d1885b9d13fb2a30dbde908b61934bbd42;hb=4f696c03a66ef6b52ee7b9b3c74a71d5abc64f7e;hp=69c401edf70b84a4ca7a10bff2d343f24e2d78e5;hpb=af7d6a5aef3bf5fec0c187b3a13a14adc88251fd;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Mod/Clip.pm b/lib/LaTeX/TikZ/Mod/Clip.pm index 69c401e..a0b0b8d 100644 --- a/lib/LaTeX/TikZ/Mod/Clip.pm +++ b/lib/LaTeX/TikZ/Mod/Clip.pm @@ -9,11 +9,11 @@ LaTeX::TikZ::Mod::Clip - A modifier that clips sequences with a path. =head1 VERSION -Version 0.01 +Version 0.03 =cut -our $VERSION = '0.01'; +our $VERSION = '0.03'; use Sub::Name (); @@ -25,13 +25,27 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; + +=head1 RELATIONSHIPS + +This class consumes the L role, and as such implements the L, L, L and L methods. + +=cut with 'LaTeX::TikZ::Mod'; +=head1 ATTRIBUTES + +=head2 C + +The path that specifies the clipped area. + +=cut + has clip => ( is => 'ro', - does => 'LaTeX::TikZ::Set::Op', + does => 'LaTeX::TikZ::Set::Path', required => 1, ); @@ -41,8 +55,18 @@ my $default_formatter = LaTeX::TikZ::Formatter->new( scale => 1, ); +=head1 METHODS + +=head2 C + +=cut + sub tag { ref $_[0] } +=head2 C + +=cut + my $get_tc = do { my %tc; @@ -116,7 +140,7 @@ my @handlers = ( [ 'LaTeX::TikZ::Set::Circle' => $cover_circle ], ); -sub cover { +sub covers { my ($old, $new) = map $_->clip, @_[0, 1]; for (@handlers) { @@ -128,8 +152,16 @@ sub cover { $old->path($default_formatter) eq $new->path($default_formatter); } +=head2 C + +=cut + sub declare { } +=head2 C + +=cut + sub apply { my ($self) = @_; @@ -156,6 +188,10 @@ LaTeX::TikZ::Functor->default_rule( __PACKAGE__->meta->make_immutable; +=head1 SEE ALSO + +L, L. + =head1 AUTHOR Vincent Pit, C<< >>, L. @@ -175,7 +211,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.