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