Fixed the pod path in archive
[sdlgit/SDL_perl.git] / lib / pods / SDL / Color.pod
CommitLineData
896b04ee 1=pod
2
3=head1 NAME
4
5SDL::Color - Format independent color description
6
7=head1 SYNOPSIS
8
9 my $black = SDL::Color->new( 0, 0, 0);
10 my $color = SDL::Color->new(255, 0, 0);
11 my $r = $color->r; # 255
12 my $g = $color->g; # 0
13 my $b = $color->b; # 0
14 $color->g(255);
15 $color->b(255);
16 # $color is now white
17
18=head1 DESCRIPTION
19
20C<SDL_Color> describes a color in a format independent way.
21
22=head1 METHODS
23
24=head2 new ( $r, $g, $b )
25
26The constructor creates a new color with the specified red, green and
27blue values:
28
29 my $color = SDL::Color->new(255, 0, 0);
30
31=head2 r
32
33If passed a value, this method sets the red component of the color;
34if not, it returns the red component of the color:
35
36 my $r = $color->r; # 255
37 $color->r(128);
38
39=head2 g
40
41If passed a value, this method sets the green component of the color;
42if not, it returns the green component of the color:
43
44 my $g = $color->g; # 255
45 $color->g(128);
46
47=head2 b
48
49If passed a value, this method sets the blue component of the color;
50if not, it returns the blue component of the color:
51
52 my $b = $color->b; # 255
53 $color->b(128);
54
55=head1 SEE ALSO
56
57L<SDL::Surface>
58
59=cut