line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LaTeX::TikZ::Mod::Fill; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
58
|
use strict; |
|
10
|
|
|
|
|
25
|
|
|
10
|
|
|
|
|
340
|
|
4
|
10
|
|
|
10
|
|
59
|
use warnings; |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
446
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
LaTeX::TikZ::Mod::Fill - A modifier that fills a closed path with a color. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.02 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
17
|
|
|
|
|
|
|
|
18
|
10
|
|
|
10
|
|
55
|
use LaTeX::TikZ::Interface; |
|
10
|
|
|
|
|
27
|
|
|
10
|
|
|
|
|
202
|
|
19
|
|
|
|
|
|
|
|
20
|
10
|
|
|
10
|
|
54
|
use Any::Moose; |
|
10
|
|
|
|
|
25
|
|
|
10
|
|
|
|
|
64
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 RELATIONSHIPS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This class consumes the L<LaTeX::TikZ::Mod> role, and as such implements the L</tag>, L</covers>, L</declare> and L</apply> methods. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
with 'LaTeX::TikZ::Mod'; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 C<color> |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has 'color' => ( |
37
|
|
|
|
|
|
|
is => 'ro', |
38
|
|
|
|
|
|
|
isa => 'Str', |
39
|
|
|
|
|
|
|
required => 1, |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 C<tag> |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
10
|
|
|
10
|
1
|
29
|
sub tag { ref $_[0] } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 C<covers> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
2
|
|
|
2
|
1
|
18
|
sub covers { $_[0]->color eq $_[1]->color } |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 C<declare> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
3
|
|
|
3
|
1
|
14
|
sub declare { } |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 C<apply> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
4
|
|
|
4
|
1
|
26
|
sub apply { 'fill=' . $_[0]->color } |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
LaTeX::TikZ::Interface->register( |
69
|
|
|
|
|
|
|
fill => sub { |
70
|
2
|
|
|
2
|
0
|
1649
|
shift; |
71
|
|
|
|
|
|
|
|
72
|
2
|
|
|
|
|
33
|
__PACKAGE__->new(color => $_[0]); |
73
|
|
|
|
|
|
|
}, |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 SEE ALSO |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<LaTeX::TikZ>, L<LaTeX::TikZ::Mod>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
You can contact me by mail or on C<irc.perl.org> (vincent). |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 BUGS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
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>. |
91
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 SUPPORT |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
perldoc LaTeX::TikZ |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Copyright 2010 Vincent Pit, all rights reserved. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; # End of LaTeX::TikZ::Mod::Fill |