]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ.pm
Remove trailing whitespace
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ.pm
index 362d136ecc20c6b7fa619ae96e3ea1e4bc33019b..b035f0068ae6c5047748acd569dfd003cf3050c4 100644 (file)
@@ -88,7 +88,7 @@ The two TikZ concepts of I<clips> and I<layers> have been unified with the modif
 Creates a L<LaTeX::TikZ::Set::Union> object out of the paths C<@kids>.
 
     # A path made of two circles
-    Tikz->path(
+    Tikz->union(
            Tikz->circle(0, 1),
            Tikz->circle(1, 1),
           )
@@ -97,6 +97,23 @@ Creates a L<LaTeX::TikZ::Set::Union> object out of the paths C<@kids>.
            'even odd rule',
           );
 
+=head3 C<< Tikz->join($connector, @kids) >>
+
+Creates a L<LaTeX::TikZ::Set::Chain> object that joins the paths C<@kinds> with the given C<$connector> which can be, according to L<LaTeX::TikZ::Set::Chain/connector>, a string, an array reference or a code reference.
+
+    # A stair
+    Tikz->join('-|', map [ $_, $_ ], 0 .. 5);
+
+=head3 C<< Tikz->chain($kid0, $link0, $kid1, $link1, ... $kidn) >>
+
+Creates a L<LaTeX::TikZ::Set::Chain> object that chains C<$kid0> to C<$kid1> with the string C<$link0>, C<$kid1> to C<$kid2> with C<$link1>, and so on.
+
+    # An heart-like shape
+    Tikz->chain([ 0, 1 ]
+     => '.. controls (-1, 1.5)    and (-0.75, 0.25) ..' => [ 0, 0 ]
+     => '.. controls (0.75, 0.25) and (1, 1.5)      ..' => [ 0, 1 ]
+    );
+
 =head3 C<< Tikz->seq(@kids) >>
 
 Creates a L<LaTeX::TikZ::Set::Sequence> object out of the sequences or paths C<@kids>.
@@ -243,7 +260,7 @@ Creates a L<LaTeX::TikZ::Mod::Layer> object with name C<$name> and optional rela
 
 The default layer is C<main>.
 
-Layers are stored into a global hash, so that when you refer to them by their name, you get the existing layer object. 
+Layers are stored into a global hash, so that when you refer to them by their name, you get the existing layer object.
 
 Layers can also be directly applied to sets with the C<< ->layer >> method.
 
@@ -251,6 +268,13 @@ Layers can also be directly applied to sets with the C<< ->layer >> method.
                    ->mod(Tikz->pattern(class => 'Dots'))
                    ->layer('top');
 
+=head3 C<< Tikz->scale($factor) >>
+
+Creates a L<LaTeX::TikZ::Mod::Scale> object that scales the sets onto which it apply by the given C<$factor>.
+
+    my $circle_of_radius_2 = Tikz->circle(0 => 1)
+                                 ->mod(Tikz->scale(2));
+
 =head3 C<< Tikz->width($line_width) >>
 
 Creates a L<LaTeX::TikZ::Mod::Width> object that sets the line width to C<$line_width> when applied.
@@ -362,8 +386,6 @@ L<Any::Moose> with L<Mouse> 0.80 or greater.
 
 L<Sub::Name>.
 
-L<Scope::Guard>.
-
 L<Math::Complex>, L<Math::Trig>.
 
 L<Scalar::Util>, L<List::Util>, L<Task::Weaken>.