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
pods::SDL::Palette(3) User Contributed Perl Documentation pods::SDL::Palette(3)

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

Core, Video, Structure

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.

  $ncolors = $palette->ncolors();

Returns the number of colors in palette.

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

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

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

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

SDL::Video SDL::PixelFormat SDL::Color SDL::Surface

See "AUTHORS" in SDL.
2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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