Unix and Linux Discussions Tagged with color |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
2 |
2,684 |
UNIX for Advanced & Expert Users |
|
|
|
9 |
13,083 |
HP-UX |
|
|
|
1 |
3,228 |
Programming |
|
|
|
2 |
4,196 |
Programming |
|
|
|
4 |
8,274 |
Programming |
|
|
|
1 |
3,932 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
3,765 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
9,659 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,920 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,681 |
IP Networking |
|
|
|
1 |
3,461 |
IP Networking |
|
|
|
8 |
3,913 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,580 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
6 |
9,072 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,706 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
4 |
2,803 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
16,187 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,583 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,728 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,360 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
3,405 |
UNIX for Dummies Questions & Answers |
pods::SDL::Color(3pm) User Contributed Perl Documentation pods::SDL::Color(3pm)
NAME
SDL::Color - Format independent color description
CATEGORY
Core, Video, Structure
SYNOPSIS
my $black = SDL::Color->new(0, 0, 0);
my $color = SDL::Color->new(255, 0, 0);
my $r = $color->r; # 255
my $g = $color->g; # 0
my $b = $color->b; # 0
$color->g(255);
$color->b(255);
# $color is now white
DESCRIPTION
"SDL_Color" describes a color in a format independent way.
METHODS
new
my $color = SDL::Color->new(255, 0, 0);
The constructor creates a new color with the specified red, green and blue values.
r
my $r = $color->r;
$color->r(128);
If passed a value, this method sets the red component of the color; if not, it returns the red component of the color.
g
my $g = $color->g;
$color->g(128);
If passed a value, this method sets the green component of the color; if not, it returns the green component of the color.
b
my $b = $color->b;
$color->b(128);
If passed a value, this method sets the blue component of the color; if not, it returns the blue component of the color.
SEE ALSO
SDL::Surface
AUTHORS
See "AUTHORS" in SDL.
perl v5.14.2 2012-05-28 pods::SDL::Color(3pm)