=head1 VERSION
-Version 0.01
+Version 0.02
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
use Sub::Name ();
use LaTeX::TikZ::Formatter;
use LaTeX::TikZ::Mod::Formatted;
+use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
use LaTeX::TikZ::Tools;
use Any::Moose;
+=head1 RELATIONSHIPS
+
+This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</covers>, L</declare> and L</apply> methods.
+
+=cut
+
with 'LaTeX::TikZ::Mod';
+=head1 ATTRIBUTES
+
+=head2 C<clip>
+
+The path that specifies the clipped area.
+
+=cut
+
has clip => (
is => 'ro',
does => 'LaTeX::TikZ::Set::Op',
scale => 1,
);
+=head1 METHODS
+
+=head2 C<tag>
+
+=cut
+
sub tag { ref $_[0] }
+=head2 C<covers>
+
+=cut
+
my $get_tc = do {
my %tc;
[ 'LaTeX::TikZ::Set::Circle' => $cover_circle ],
);
-sub cover {
+sub covers {
my ($old, $new) = map $_->clip, @_[0, 1];
for (@handlers) {
$old->path($default_formatter) eq $new->path($default_formatter);
}
+=head2 C<declare>
+
+=cut
+
sub declare { }
+=head2 C<apply>
+
+=cut
+
sub apply {
my ($self) = @_;
)
}
-use LaTeX::TikZ::Interface clip => sub {
- shift;
+LaTeX::TikZ::Interface->register(
+ clip => sub {
+ shift;
- __PACKAGE__->new(clip => $_[0]);
-};
+ __PACKAGE__->new(clip => $_[0]);
+ },
+);
LaTeX::TikZ::Functor->default_rule(
(__PACKAGE__) => sub {
__PACKAGE__->meta->make_immutable;
+=head1 SEE ALSO
+
+L<LaTeX::TikZ>, L<LaTeX::TikZ::Mod>.
+
=head1 AUTHOR
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.