1 package LaTeX::TikZ::Point;
8 LaTeX::TikZ::Point - Internal representation of what LaTeX::TikZ consider as 2D points.
16 our $VERSION = '0.02';
19 use Mouse::Util::TypeConstraints qw<
22 register_type_constraint
29 The abscissa of the point.
41 The ordinate of the point.
51 use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce;
53 register_type_constraint(
54 LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new(
55 name => 'LaTeX::TikZ::Point::Autocoerce',
56 target => find_type_constraint(__PACKAGE__),
60 coerce 'LaTeX::TikZ::Point::Autocoerce'
61 => from 'LaTeX::TikZ::Point'
64 coerce 'LaTeX::TikZ::Point::Autocoerce'
66 => via { LaTeX::TikZ::Point->new(x => $_, y => 0) };
68 coerce 'LaTeX::TikZ::Point::Autocoerce'
70 => via { LaTeX::TikZ::Point->new(x => $_->[0], y => $_->[1]) };
72 __PACKAGE__->meta->make_immutable;
80 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
82 You can contact me by mail or on C<irc.perl.org> (vincent).
86 Please report any bugs or feature requests to C<bug-latex-tikz at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-TikZ>.
87 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
91 You can find documentation for this module with the perldoc command.
95 =head1 COPYRIGHT & LICENSE
97 Copyright 2010 Vincent Pit, all rights reserved.
99 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
103 1; # End of LaTeX::TikZ::Point