Sanko Robinson > FLTK-0.532009 > FLTK::PixelType

Download:
FLTK-0.532009.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.532006   Source  

NAME ^

FLTK::PixelType - Describes how colors are stored in a pixel

Description ^

Enumeration describing how colors are stored in an array of bytes that is a pixel. This is used as an argument for drawimage(), readimage(), and FLTK::Image.

Notice that the order of the bytes in memory of ARGB32 or RGB32 is a,r,g,b on a little-endian machine and b,g,r,a on a big-endian machine. Due to the use of these types by Windows, this is often the fastest form of data, if you have a choice. To convert an FLTK::Color to RGB32, shift it right by 8 (for ARGB32 shift the alpha left 24 and or it in).

More types may be added in the future. The set is as minimal as possible while still covering the types I have actually encountered.

Functions ^

depth

my $d = FLTK::depth( $type );

Turn a PixelType into the number of bytes needed to hold a pixel.

Import this function with the :pixeltype tag.

PixelTypes ^

These are the currently supported types:

Author ^

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

License and Legal ^

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.

When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.

syntax highlighting: