GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PODS::SDL::COLOR (3)

.ds Aq ’

NAME

SDL::Color - Format independent color description

    CATEGORY

Core, Video, Structure

CONTENTS

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.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PODS::SDL::COLOR (3) 2016-04-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.