]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Set.pm
First cut at the documentation
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Set.pm
index e0886cb1bdd04560ea125857d5e774c20acde08b..505dfec1a823712e0ce06477ed39a186d4416a5c 100644 (file)
@@ -23,9 +23,13 @@ use LaTeX::TikZ::Tools;
 
 use Any::Moose 'Role';
 
-requires qw(
- draw
-);
+=head1 ATTRIBUTES
+
+=head2 C<mods>
+
+Returns the list of the L<LaTeX::TikZ::Mod> objects associated with the current set.
+
+=cut
 
 has '_mods' => (
  is       => 'ro',
@@ -37,6 +41,30 @@ has '_mods' => (
 
 sub mods { @{$_[0]->_mods} }
 
+=head1 METHODS
+
+This method is required by the interface :
+
+=over 4
+
+=item *
+
+C<draw>
+
+=back
+
+=cut
+
+requires qw(
+ draw
+);
+
+=head2 C<mod @mods>
+
+Apply the given list of L<LaTeX::TikZ::Mod> objects to the current set.
+
+=cut
+
 my $ltm_tc  = LaTeX::TikZ::Tools::type_constraint('LaTeX::TikZ::Mod');
 my $ltml_tc = LaTeX::TikZ::Tools::type_constraint('LaTeX::TikZ::Mod::Layer');
 my $ltmc_tc = LaTeX::TikZ::Tools::type_constraint('LaTeX::TikZ::Mod::Clip');
@@ -110,6 +138,13 @@ MOD:
  };
 }
 
+=head2 C<layer $layer>
+
+Puts the current set in the corresponding layer.
+This is a shortcut for C<< $set->mod(Tikz->layer($layer)) >>.
+
+=cut
+
 sub layer {
  return $_[0] unless @_ > 1;
 
@@ -121,6 +156,13 @@ sub layer {
  )
 }
 
+=head2 C<clip $path>
+
+Clips the current set by the path given by C<$path>.
+This is a shortcut for C<< $set->mod(Tikz->clip($path)) >>.
+
+=cut
+
 sub clip {
  return $_[0] unless @_ > 1;