#include <format.h>
Collaboration diagram for PixmapFormat:
Public Types | |
enum | Format { None = 0, Gray, GrayA, RGB, RGBA, RGBFT, _LASTF } |
General image formats. These just represent what type of data is present in the channels. More... | |
enum | CommonID { Gray_1, Gray_8, Gray_16, GrayA_8, GrayA_16, RGB_8, RGB_16, RGBA_8, RGBA_16, RGB_555, RGB_565, RGBFT_f, _LASTID } |
Commonly used formats for convenience:. More... | |
Public Member Functions | |
PixmapFormat (CommonID cid) | |
Construct a commonly used pixmap format:. | |
PixmapFormat (Format id, const signed char *bits) | |
PixmapFormat (const PixmapFormat &pf) | |
Copy constructor:. | |
~PixmapFormat () | |
void | set (CommonID cid) |
Assign a format; this works like the constructors above. | |
void | set (Format id, const signed char *bits) |
PixmapFormat & | operator= (CommonID cid) |
PixmapFormat & | operator= (const PixmapFormat &pf) |
Format | format () const |
short int | nchannels () const |
signed char | bits (short int c) const |
No range check on the channel index c=0..nchannels()-1. | |
signed char | SameBitsForAll () const |
bool | operator== (const PixmapFormat &pf) const |
Compare two pixmap formats if they match exactly. | |
bool | operator!= (const PixmapFormat &pf) const |
bool | operator== (Format fmt) const |
Compare format (identifier), not bit depths:. | |
bool | operator!= (Format fmt) const |
Static Public Attributes | |
const int | MaxChannels = 6 |
const signed char | FloatBits = -1 |
Special value for the bits[]:. | |
const short int | _nchannels [_LASTF] |
Returns the number of channels when indexed with a format:. | |
Private Member Functions | |
void | _set (CommonID cid) |
void | _set (Format fmt, const signed char *bits) |
Private Attributes | |
FMT | f |
See above; this stores the actual format information. |
The pixmap format is specified by the number of channels and the number of bits in each channel. There are a number of constructors for connonly used values.
Definition at line 59 of file format.h.
|
|
General image formats. These just represent what type of data is present in the channels.
Definition at line 70 of file format.h. Referenced by format(). |
|
Construct a commonly used pixmap format:.
Definition at line 139 of file format.h. References _set(). |
|
Construct a pixmap format by specifying a format (e.g. RGB) and the number of bits in each channel. Use FloatBits for flt representation. bits[] is an array with one entry for each channel; the number of channels is known from the format. For example, for format RGBA, there are 4 channels and their width in bits is specified in the order R-G-B-A (as suggested by the format "mnemonic"). Definition at line 148 of file format.h. References _set(). |
|
Copy constructor:.
Definition at line 151 of file format.h. References f. |
|
|
|
Definition at line 82 of file format.cc. References _LASTF, _nchannels, Assert, PixmapFormat::FMT::bits, f, and PixmapFormat::FMT::format. |
|
For internal use only. Internally used: Definition at line 75 of file format.cc. References _LASTID, Assert, commons, and f. Referenced by operator=(), PixmapFormat(), and set(). |
|
No range check on the channel index c=0..nchannels()-1.
Definition at line 168 of file format.h. References PixmapFormat::FMT::bits, and f. Referenced by PixmapImageTile::_SetPixelFuncs(), operator==(), and SameBitsForAll(). |
|
Query format, number of channels and bits per channel (FloatBits for flt): Definition at line 165 of file format.h. References f, PixmapFormat::FMT::format, and Format. |
|
Definition at line 166 of file format.h. References _nchannels, f, and PixmapFormat::FMT::format. Referenced by PixmapImageTile::_SetPixelFuncs(), operator==(), and SameBitsForAll(). |
|
Definition at line 184 of file format.h. References f, and PixmapFormat::FMT::format. |
|
Definition at line 179 of file format.h. References operator==(). |
|
Definition at line 160 of file format.h. References f. |
|
Definition at line 158 of file format.h. References _set(). |
|
Compare format (identifier), not bit depths:.
Definition at line 183 of file format.h. References f, and PixmapFormat::FMT::format. |
|
Compare two pixmap formats if they match exactly.
Definition at line 91 of file format.cc. References bits(), f, PixmapFormat::FMT::format, and nchannels(). Referenced by operator!=(). |
|
Check if all channels have equal number of bits and return the number of bits in that case. If the number of channels is 0 (format None) or the channels have different number of bits, 0 is returned. Definition at line 64 of file format.cc. References bits(), and nchannels(). Referenced by PixmapImageTile::_SetPixelFuncs(). |
|
Definition at line 156 of file format.h. References _set(). |
|
Assign a format; this works like the constructors above.
Definition at line 155 of file format.h. References _set(). |
|
Initial value: { 0, 1, 2, 3, 4, 5, }
Definition at line 53 of file format.cc. Referenced by _set(), and nchannels(). |
|
See above; this stores the actual format information.
Definition at line 132 of file format.h. Referenced by _set(), bits(), format(), nchannels(), operator!=(), operator=(), operator==(), and PixmapFormat(). |
|
Special value for the bits[]:.
|
|
|