=head1 VERSION
-Version 0.01
+Version 0.02
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
=head1 SYNOPSIS
# A couple of lines
my $hline = Tikz->line(-1 => 1);
- my $vline = Tikz->line([ 0, -1 ] => [ 0, -1 ]);
+ my $vline = Tikz->line([ 0, -1 ] => [ 0, 1 ]);
# Paint them in red
$_->mod(Tikz->color('red')) for $hline, $vline;
$octo->mod(Tikz->pattern(class => 'Dots'));
# Create a formatter object
- my $tikz = Tikz->formatter;
+ my $tikz = Tikz->formatter(scale => 5);
# Put those objects all together and print them
my $seq = Tikz->seq($octo, $hline, $vline);
=head1 DESCRIPTION
-This module provides an object model for TikZ, a graphical tookit for LaTeX.
+This module provides an object model for TikZ, a graphical toolkit for LaTeX.
It allows you to build structures representing geometrical figures, apply a wide set of modifiers on them, transform them globally with functors, and print them in the context of an existing TeX document.
=head1 CONCEPTS
-Traditionnaly, in TikZ, there are two ways of grouping elements, or I<ops>, together :
+Traditionally, in TikZ, there are two ways of grouping paths together :
=over 4
=item *
-either as a I<sequence>, where each element is drawn in its own line :
+either as a I<sequence>, where each path is drawn in its own line :
\draw (0cm,0cm) -- (0cm,1cm) ;
\draw (0cm,0cm) -- (1cm,0cm) ;
=item *
-or as a I<path>, where elements are all drawn as one line :
+or as an I<union>, where paths are all drawn as one line :
\draw (0cm,0cm) -- (0cm,1cm) (0cm,0cm) -- (1cm,0cm) ;
=back
-This distinction is important because there are some primitves that only apply to paths but not to sequences, and vice versa.
+This distinction is important because there are some primitives that only apply to paths but not to sequences, and vice versa.
-Figures are made of ops, path or sequence I<sets> assembled together in a tree.
+Figures are made of path or sequence I<sets> assembled together in a tree.
I<Modifiers> can be applied onto any set to alter the way in which it is generated.
The two TikZ concepts of I<clips> and I<layers> have been unified with the modifiers.
=head2 Containers
-=head3 C<< Tikz->path(@ops) >>
+=head3 C<< Tikz->union(@seq) >>
-Creates a L<LaTeX::TikZ::Set::Path> object out of the ops C<@ops>.
+Creates a L<LaTeX::TikZ::Set::Union> object out of the paths C<@kids>.
# A path made of two circles
Tikz->path(
=head3 C<< Tikz->seq(@kids) >>
-Creates a L<LaTeX::TikZ::Set::Sequence> object out of the sequences, paths or ops C<@kids>.
+Creates a L<LaTeX::TikZ::Set::Sequence> object out of the sequences or paths C<@kids>.
my $bag = Tikz->seq($sequence, $path, $circle, $raw, $point);
=back
-You can define automatic coercions from your user point types to L<LaTeX::TikZ::Point> by writing your own L<LaTeX::TikZ::Point::My::User::Point> class.
+You can define automatic coercions from your user point types to L<LaTeX::TikZ::Point> by writing your own C<LaTeX::TikZ::Point::My::User::Point> class.
See L<LaTeX::TikZ::Meta::TypeConstraint::Autocoerce> for the rationale and L<LaTeX::TikZ::Point::Math::Complex> for an example.
=head3 C<< Tikz->line($from => $to) >>
=head3 C<< Tikz->closed_polyline(@points) >>
-Creates a L<LaTeX::TikZ::Set::Polyline> object that cycles through successive eleemnts of C<@points>.
+Creates a L<LaTeX::TikZ::Set::Polyline> object that cycles through successive elements of C<@points>.
my $diamond = Tikz->closed_polyline(
Tikz->point(0, 1),
=head3 C<< Tikz->color($color) >>
-Creates a L<LaTeX::TikZ::Mod::Color>object that sets the line color to C<$color> (given in the C<xcolor> syntax).
+Creates a L<LaTeX::TikZ::Mod::Color> object that sets the line color to C<$color> (given in the C<xcolor> syntax).
# Paint the previous $thick_arrow in red.
$thick_arrow->mod(Tikz->color('red'));
=head3 C<< Tikz->functor(@rules) >>
Creates a L<LaTeX::TikZ::Functor> anonymous subroutine that can be called against L<LaTeX::TikZ::Set> trees to clone them according to the given rules.
-C<@rules> should be made of array references whose first element is the class/role to match against and the second the handler to run.
+C<@rules> should be a list of array references whose first element is the class/role to match against and the second the handler to execute.
# The default is a clone method
my $clone = Tikz->functor;
# A mod stripper
my $strip = Tikz->functor(
- 'LaTeX::TikZ::Mod' => sub { return },
+ '+LaTeX::TikZ::Mod' => sub { return },
);
my $naked = $set->$strip;
=head1 DEPENDENCIES
-L<Any::Moose> with L<Mouse> 0.63 or greater.
+L<Any::Moose> with L<Mouse> 0.80 or greater.
L<Sub::Name>.