line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LaTeX::TikZ::Point; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
186
|
use strict; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
336
|
|
4
|
10
|
|
|
10
|
|
52
|
use warnings; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
389
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
LaTeX::TikZ::Point - Internal representation of what LaTeX::TikZ consider as 2D points. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.02 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
17
|
|
|
|
|
|
|
|
18
|
10
|
|
|
10
|
|
8494
|
use Any::Moose; |
|
10
|
|
|
|
|
525892
|
|
|
10
|
|
|
|
|
87
|
|
19
|
10
|
|
|
|
|
62
|
use Any::Moose 'Util::TypeConstraints' => [ qw/ |
20
|
|
|
|
|
|
|
coerce |
21
|
|
|
|
|
|
|
from |
22
|
|
|
|
|
|
|
via |
23
|
|
|
|
|
|
|
find_type_constraint |
24
|
|
|
|
|
|
|
register_type_constraint |
25
|
10
|
|
|
10
|
|
6611
|
/ ]; |
|
10
|
|
|
|
|
22
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 C<x> |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
The abscissa of the point. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has 'x' => ( |
36
|
|
|
|
|
|
|
is => 'ro', |
37
|
|
|
|
|
|
|
isa => 'Num', |
38
|
|
|
|
|
|
|
required => 1, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 C<y> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
The ordinate of the point. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has 'y' => ( |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
isa => 'Num', |
50
|
|
|
|
|
|
|
required => 1, |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
10
|
|
|
10
|
|
21371
|
use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; |
|
10
|
|
|
|
|
33
|
|
|
10
|
|
|
|
|
2208
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
register_type_constraint( |
56
|
|
|
|
|
|
|
LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new( |
57
|
|
|
|
|
|
|
name => 'LaTeX::TikZ::Point::Autocoerce', |
58
|
|
|
|
|
|
|
parent => find_type_constraint(__PACKAGE__), |
59
|
|
|
|
|
|
|
), |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
coerce 'LaTeX::TikZ::Point::Autocoerce' |
63
|
|
|
|
|
|
|
=> from 'LaTeX::TikZ::Point' |
64
|
|
|
|
|
|
|
=> via { $_ }; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
coerce 'LaTeX::TikZ::Point::Autocoerce' |
67
|
|
|
|
|
|
|
=> from 'Num' |
68
|
|
|
|
|
|
|
=> via { LaTeX::TikZ::Point->new(x => $_, y => 0) }; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
coerce 'LaTeX::TikZ::Point::Autocoerce' |
71
|
|
|
|
|
|
|
=> from 'ArrayRef' |
72
|
|
|
|
|
|
|
=> via { LaTeX::TikZ::Point->new(x => $_->[0], y => $_->[1]) }; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SEE ALSO |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<LaTeX::TikZ>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can contact me by mail or on C<irc.perl.org> (vincent). |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 BUGS |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
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>. |
89
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SUPPORT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
perldoc LaTeX::TikZ |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Copyright 2010 Vincent Pit, all rights reserved. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; # End of LaTeX::TikZ::Point |