Commit | Line | Data |
162a0989 |
1 | <div class="pod"> |
2 | <!-- INDEX START --> |
3 | <h3 id="TOP">Index</h3> |
4 | |
60f74f6f |
5 | <ul><li><a href="#NAME">NAME</a> |
6 | <ul><li><a href="#CATEGORY">CATEGORY</a></li> |
7 | </ul> |
8 | </li> |
162a0989 |
9 | <li><a href="#SYNOPSIS">SYNOPSIS</a></li> |
10 | <li><a href="#DESCRIPTION">DESCRIPTION</a></li> |
11 | <li><a href="#METHODS">METHODS</a> |
12 | <ul><li><a href="#new_r_g_b">new ( $r, $g, $b )</a></li> |
13 | <li><a href="#r">r</a></li> |
14 | <li><a href="#g">g</a></li> |
15 | <li><a href="#b">b</a></li> |
16 | </ul> |
17 | </li> |
18 | <li><a href="#SEE_ALSO">SEE ALSO</a> |
19 | </li> |
20 | </ul><hr /> |
21 | <!-- INDEX END --> |
22 | |
23 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
24 | <div id="NAME_CONTENT"> |
25 | <p>SDL::Color - Format independent color description</p> |
26 | |
27 | </div> |
60f74f6f |
28 | <h2 id="CATEGORY">CATEGORY</h2> |
29 | <div id="CATEGORY_CONTENT"> |
30 | <p>Core, Video, Structure</p> |
31 | |
32 | </div> |
162a0989 |
33 | <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
34 | <div id="SYNOPSIS_CONTENT"> |
35 | <pre> my $black = SDL::Color->new( 0, 0, 0); |
36 | my $color = SDL::Color->new(255, 0, 0); |
37 | my $r = $color->r; # 255 |
38 | my $g = $color->g; # 0 |
39 | my $b = $color->b; # 0 |
40 | $color->g(255); |
41 | $color->b(255); |
42 | # $color is now white |
43 | |
44 | </pre> |
45 | |
46 | </div> |
47 | <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
48 | <div id="DESCRIPTION_CONTENT"> |
49 | <p><code>SDL_Color</code> describes a color in a format independent way.</p> |
50 | |
51 | </div> |
52 | <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
53 | <div id="METHODS_CONTENT"> |
54 | |
55 | </div> |
56 | <h2 id="new_r_g_b">new ( $r, $g, $b )</h2> |
57 | <div id="new_r_g_b_CONTENT"> |
58 | <p>The constructor creates a new color with the specified red, green and |
59 | blue values:</p> |
60 | <pre> my $color = SDL::Color->new(255, 0, 0); |
61 | |
62 | </pre> |
63 | |
64 | </div> |
65 | <h2 id="r">r</h2> |
66 | <div id="r_CONTENT"> |
67 | <p>If passed a value, this method sets the red component of the color; |
68 | if not, it returns the red component of the color:</p> |
69 | <pre> my $r = $color->r; # 255 |
70 | $color->r(128); |
71 | |
72 | </pre> |
73 | |
74 | </div> |
75 | <h2 id="g">g</h2> |
76 | <div id="g_CONTENT"> |
77 | <p>If passed a value, this method sets the green component of the color; |
78 | if not, it returns the green component of the color:</p> |
79 | <pre> my $g = $color->g; # 255 |
80 | $color->g(128); |
81 | |
82 | </pre> |
83 | |
84 | </div> |
85 | <h2 id="b">b</h2> |
86 | <div id="b_CONTENT"> |
87 | <p>If passed a value, this method sets the blue component of the color; |
88 | if not, it returns the blue component of the color:</p> |
89 | <pre> my $b = $color->b; # 255 |
90 | $color->b(128); |
91 | |
92 | </pre> |
93 | |
94 | </div> |
95 | <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p> |
96 | <div id="SEE_ALSO_CONTENT"> |
55bbf7a2 |
97 | <p><a href="SDL-Surface.html">SDL::Surface</a></p> |
162a0989 |
98 | |
99 | </div> |
100 | </div> |