PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/pods/SDL/Color.pod

http://github.com/PerlGameDev/SDL
Unknown | 68 lines | 40 code | 28 blank | 0 comment | 0 complexity | 102b755047d0f856000f9074c7268452 MD5 | raw file
 1
 2=pod
 3
 4=head1 NAME
 5
 6SDL::Color - Format independent color description
 7
 8=head2 CATEGORY
 9
10Core, Video, Structure
11
12=head1 SYNOPSIS
13
14 my $black = SDL::Color->new(0, 0, 0);
15 my $color = SDL::Color->new(255, 0, 0);
16 my $r = $color->r; # 255
17 my $g = $color->g; # 0
18 my $b = $color->b; # 0
19 $color->g(255);
20 $color->b(255);
21 # $color is now white
22
23=head1 DESCRIPTION
24
25C<SDL_Color> describes a color in a format independent way.
26
27=head1 METHODS
28
29=head2 new
30
31 my $color = SDL::Color->new(255, 0, 0);
32
33The constructor creates a new color with the specified red, green and blue values.
34
35=head2 r
36
37 my $r = $color->r;
38 $color->r(128);
39
40If passed a value, this method sets the red component of the color;
41if not, it returns the red component of the color.
42
43=head2 g
44
45 my $g = $color->g;
46 $color->g(128);
47
48If passed a value, this method sets the green component of the color;
49if not, it returns the green component of the color.
50
51=head2 b
52
53 my $b = $color->b;
54 $color->b(128);
55
56If passed a value, this method sets the blue component of the color;
57if not, it returns the blue component of the color.
58
59=head1 SEE ALSO
60
61L<SDL::Surface>
62
63=head1 AUTHORS
64
65See L<SDL/AUTHORS>.
66
67
68=cut