Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PNMImageHeader::PixelSpec Class Reference

Public Member Functions

 PixelSpec (xelval gray_value)
 
 PixelSpec (xelval gray_value, xelval alpha)
 
 PixelSpec (xelval red, xelval green, xelval blue)
 
 PixelSpec (xelval red, xelval green, xelval blue, xelval alpha)
 
 PixelSpec (const xel &rgb)
 
 PixelSpec (const xel &rgb, xelval alpha)
 
int compare_to (const PixelSpec &other) const
 
xelval get_alpha () const
 
xelval get_blue () const
 
xelval get_green () const
 
xelval get_red () const
 
bool operator != (const PixelSpec &other) const
 
xelval operator [] (int n) const
 Indexes numerically into the components, in the order R, G, B, A. More...
 
bool operator< (const PixelSpec &other) const
 
bool operator== (const PixelSpec &other) const
 
void output (std::ostream &out) const
 
void set_alpha (xelval alpha)
 
void set_blue (xelval blue)
 
void set_green (xelval green)
 
void set_red (xelval red)
 

Static Public Member Functions

static int size ()
 Specifies the number of components in the PixelSpec; this is always 4, regardless of the type of image it was taken from. More...
 

Public Attributes

xelval _alpha
 
xelval _blue
 
xelval _green
 
xelval _red
 

Detailed Description

Definition at line 115 of file pnmImageHeader.h.

Member Function Documentation

◆ operator []()

xelval PNMImageHeader::PixelSpec::operator [] ( int  n) const
inline

Indexes numerically into the components, in the order R, G, B, A.

This also makes the PixelSpec work like a tuple in Python.

Definition at line 411 of file pnmImageHeader.I.

◆ size()

int PNMImageHeader::PixelSpec::size ( )
inlinestatic

Specifies the number of components in the PixelSpec; this is always 4, regardless of the type of image it was taken from.

Definition at line 421 of file pnmImageHeader.I.


The documentation for this class was generated from the following files: