C<tag>
Returns an identifier for the mod object.
-It is used to gather mods together when calling C<cover> on them.
+It is used to gather mods together when calling C<covers> on them.
=item *
-C<cover $mod>
+C<covers $mod>
Returns true if and only if the effects of the mod C<$mod> are already ensured by the current mod object, in which case no actual TikZ code will be emitted for C<$mod>.
Both mod objects are guaranteed to have the same C<tag>.
requires qw(
tag
- cover
+ covers
declare
apply
);
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
sub tag { ref $_[0] }
-=head2 C<cover>
+=head2 C<covers>
=cut
[ 'LaTeX::TikZ::Set::Circle' => $cover_circle ],
);
-sub cover {
+sub covers {
my ($old, $new) = map $_->clip, @_[0, 1];
for (@handlers) {
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
sub tag { ref $_[0] }
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { $_[0]->color eq $_[1]->color }
+sub covers { $_[0]->color eq $_[1]->color }
=head2 C<declare>
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
sub tag { ref $_[0] }
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { $_[0]->color eq $_[1]->color }
+sub covers { $_[0]->color eq $_[1]->color }
=head2 C<declare>
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
ref($self) . '/' . $self->name;
}
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { $_[0]->name eq $_[1]->name }
+sub covers { $_[0]->name eq $_[1]->name }
=head2 C<score>
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
sub tag { ref $_[0] }
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { 0 }
+sub covers { 0 }
=head2 C<declare>
=head1 RELATIONSHIPS
-This class inherits the L<LaTeX::TikZ::Mod::Pattern> class and its L<LaTeX::TikZ::Mod::Pattern/tag>, L<LaTeX::TikZ::Mod::Pattern/cover>, L<LaTeX::TikZ::Mod::Pattern/declare> and L<LaTeX::TikZ::Mod::Pattern/apply> methods.
+This class inherits the L<LaTeX::TikZ::Mod::Pattern> class and its L<LaTeX::TikZ::Mod::Pattern/tag>, L<LaTeX::TikZ::Mod::Pattern/covers>, L<LaTeX::TikZ::Mod::Pattern/declare> and L<LaTeX::TikZ::Mod::Pattern/apply> methods.
=cut
=head1 RELATIONSHIPS
-This class inherits the L<LaTeX::TikZ::Mod::Pattern> class and its L</tag>, L</cover>, L<LaTeX::TikZ::Mod::Pattern/declare> and L<LaTeX::TikZ::Mod::Pattern/apply> methods.
+This class inherits the L<LaTeX::TikZ::Mod::Pattern> class and its L</tag>, L</covers>, L<LaTeX::TikZ::Mod::Pattern/declare> and L<LaTeX::TikZ::Mod::Pattern/apply> methods.
=cut
sub tag { join '/', ref $_[0], $_[0]->direction }
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover {
+sub covers {
my ($this, $other) = @_;
LaTeX::TikZ::Tools::numeq($this->line_width, $other->line_width) or return 0;
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
ref($self) . '/' . $self->content;
}
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { 0 }
+sub covers { 0 }
=head2 C<declare>
=head1 RELATIONSHIPS
-This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</cover>, L</declare> and L</apply> methods.
+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
sub tag { ref $_[0] }
-=head2 C<cover>
+=head2 C<covers>
=cut
-sub cover { LaTeX::TikZ::Tools::numeq($_[0]->width, $_[1]->width) }
+sub covers { LaTeX::TikZ::Tools::numeq($_[0]->width, $_[1]->width) }
=head2 C<declare>
my $tag = $mod->tag;
my $old = $mods{$tag} || [];
for (@$old) {
- next MOD if $_->[0]->cover($mod);
+ next MOD if $_->[0]->covers($mod);
}
push @{$mods{$tag}}, [ $mod, $last_mod++, $is_layer ];
push @mods, $mod;