File Coverage

blib/lib/Graphics/Primitive/Paint/Solid.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package Graphics::Primitive::Paint::Solid;
2 1     1   26559 use Moose;
  0            
  0            
3             use MooseX::Storage;
4              
5             extends 'Graphics::Primitive::Paint';
6              
7             with qw(MooseX::Clone);
8             with Storage (format => 'JSON', io => 'File');
9              
10             has color => (
11             isa => 'Graphics::Color',
12             is => 'rw',
13             traits => [qw(Clone)]
14             );
15              
16             __PACKAGE__->meta->make_immutable;
17              
18             no Moose;
19             1;
20             =head1 NAME
21              
22             Graphics::Primitive::Paint::Solid - Solid patch of color
23              
24             =head1 DESCRIPTION
25              
26             Graphics::Primitive::Paint::Solid represents a solid color.
27              
28             =head1 SYNOPSIS
29              
30             use Graphics::Primitive::Paint::Solid;
31              
32             my $solid = Graphics::Primitive::Solid->new;
33             $solid->color(Graphics::Color::RGB->new(red => 1, green => 0, blue => 0));
34              
35             =head1 METHODS
36              
37             =head2 Constructor
38              
39             =over 4
40              
41             =item I<new>
42              
43             Creates a new Graphics::Primitive::Solid
44              
45             =back
46              
47             =head2 Instance Methods
48              
49             =over 4
50              
51             =item I<color>
52              
53             Get/Set the color of this solid
54              
55             =back
56              
57             =head1 AUTHOR
58              
59             Cory Watson <gphat@cpan.org>
60              
61             =head1 COPYRIGHT & LICENSE
62              
63             Copyright 2008-2010 by Cory G Watson.
64              
65             You can redistribute and/or modify this code under the same terms as Perl
66             itself.