1 package LaTeX::TikZ::Set::Arrow;
8 LaTeX::TikZ::Set::Arrow - A combined set object representing an arrow.
16 our $VERSION = '0.01';
20 use LaTeX::TikZ::Point;
22 use LaTeX::TikZ::Set::Line;
24 use LaTeX::TikZ::Interface;
26 use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ];
28 my $ltp_tc = find_type_constraint('LaTeX::TikZ::Point::Autocoerce');
30 LaTeX::TikZ::Interface->register(
34 Carp::confess('Not enough arguments') unless @_ >= 2;
36 my $from = $ltp_tc->coerce(shift);
40 my $dir = $ltp_tc->coerce($_[1]);
41 $to = LaTeX::TikZ::Point->new(
42 x => $from->x + $dir->x,
43 y => $from->y + $dir->y,
49 LaTeX::TikZ::Set::Line->new(
58 L<LaTeX::TikZ>, L<LaTeX::TikZ::Set>.
62 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
64 You can contact me by mail or on C<irc.perl.org> (vincent).
68 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>.
69 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
73 You can find documentation for this module with the perldoc command.
77 =head1 COPYRIGHT & LICENSE
79 Copyright 2010 Vincent Pit, all rights reserved.
81 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
85 1; # End of LaTeX::TikZ::Set::Arrow