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::PALETTE (3)

.ds Aq ’

NAME

SDL::Palette -- Color palette for 8-bit pixel formats

CONTENTS

CATEGORY

Core, Video, Structure

DESCRIPTION

Each pixel in an 8-bit surface is an index into the colors field of the SDL::Palette object stored in its SDL::PixelFormat. A SDL::Palette is created automatically when SDL allocates a SDL::PixelFormat for a surface. This class has methods for returning the colors in a palette object. The colors can be set with SDL::Video::set_colors and SDL::Video::set_palette.

METHODS

    ncolors



  $ncolors = $palette->ncolors();



Returns the number of colors in palette.

    colors



  @colors = @{ $palette->colors() };



Returns an array, ncolors in length, of the SDL::Colors in the palette.

    color_index



  $color = $palette->color_index( $index );



Returns the SDL::Color at the provided index of the palette.

SEE ALSO

SDL::Video SDL::PixelFormat SDL::Color 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::PALETTE (3) 2016-04-05

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