Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PNMImageHeader::PixelSpec Class Reference

Public Member Functions

 PixelSpec (const xel &rgb)
 
 PixelSpec (const xel &rgb, xelval alpha)
 
 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)
 
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
 
bool operator< (const PixelSpec &other) const
 
bool operator== (const PixelSpec &other) const
 
xelval operator[] (int n) const
 Indexes numerically into the components, in the order R, G, B, A.
 
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.
 

Public Attributes

xelval _alpha
 
xelval _blue
 
xelval _green
 
xelval _red
 

Detailed Description

Definition at line 115 of file pnmImageHeader.h.

Constructor & Destructor Documentation

◆ PixelSpec() [1/6]

PNMImageHeader::PixelSpec::PixelSpec ( xelval gray_value)
inline

Definition at line 229 of file pnmImageHeader.I.

◆ PixelSpec() [2/6]

PNMImageHeader::PixelSpec::PixelSpec ( xelval gray_value,
xelval alpha )
inline

Definition at line 241 of file pnmImageHeader.I.

◆ PixelSpec() [3/6]

PNMImageHeader::PixelSpec::PixelSpec ( xelval red,
xelval green,
xelval blue )
inline

Definition at line 253 of file pnmImageHeader.I.

◆ PixelSpec() [4/6]

PNMImageHeader::PixelSpec::PixelSpec ( xelval red,
xelval green,
xelval blue,
xelval alpha )
inline

Definition at line 265 of file pnmImageHeader.I.

◆ PixelSpec() [5/6]

PNMImageHeader::PixelSpec::PixelSpec ( const xel & rgb)
inline

Definition at line 277 of file pnmImageHeader.I.

◆ PixelSpec() [6/6]

PNMImageHeader::PixelSpec::PixelSpec ( const xel & rgb,
xelval alpha )
inline

Definition at line 289 of file pnmImageHeader.I.

Member Function Documentation

◆ compare_to()

int PNMImageHeader::PixelSpec::compare_to ( const PixelSpec & other) const
inline

Definition at line 325 of file pnmImageHeader.I.

◆ get_alpha()

xelval PNMImageHeader::PixelSpec::get_alpha ( ) const
inline

Definition at line 369 of file pnmImageHeader.I.

◆ get_blue()

xelval PNMImageHeader::PixelSpec::get_blue ( ) const
inline

Definition at line 361 of file pnmImageHeader.I.

◆ get_green()

xelval PNMImageHeader::PixelSpec::get_green ( ) const
inline

Definition at line 353 of file pnmImageHeader.I.

◆ get_red()

xelval PNMImageHeader::PixelSpec::get_red ( ) const
inline

Definition at line 345 of file pnmImageHeader.I.

◆ operator!=()

bool PNMImageHeader::PixelSpec::operator!= ( const PixelSpec & other) const
inline

Definition at line 317 of file pnmImageHeader.I.

◆ operator<()

bool PNMImageHeader::PixelSpec::operator< ( const PixelSpec & other) const
inline

Definition at line 301 of file pnmImageHeader.I.

◆ operator==()

bool PNMImageHeader::PixelSpec::operator== ( const PixelSpec & other) const
inline

Definition at line 309 of file pnmImageHeader.I.

◆ 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 410 of file pnmImageHeader.I.

◆ output()

void PNMImageHeader::PixelSpec::output ( std::ostream & out) const

Definition at line 486 of file pnmImageHeader.cxx.

◆ set_alpha()

void PNMImageHeader::PixelSpec::set_alpha ( xelval alpha)
inline

Definition at line 401 of file pnmImageHeader.I.

◆ set_blue()

void PNMImageHeader::PixelSpec::set_blue ( xelval blue)
inline

Definition at line 393 of file pnmImageHeader.I.

◆ set_green()

void PNMImageHeader::PixelSpec::set_green ( xelval green)
inline

Definition at line 385 of file pnmImageHeader.I.

◆ set_red()

void PNMImageHeader::PixelSpec::set_red ( xelval red)
inline

Definition at line 377 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 420 of file pnmImageHeader.I.

Member Data Documentation

◆ _alpha

xelval PNMImageHeader::PixelSpec::_alpha

Definition at line 148 of file pnmImageHeader.h.

◆ _blue

xelval PNMImageHeader::PixelSpec::_blue

Definition at line 148 of file pnmImageHeader.h.

◆ _green

xelval PNMImageHeader::PixelSpec::_green

Definition at line 148 of file pnmImageHeader.h.

◆ _red

xelval PNMImageHeader::PixelSpec::_red

Definition at line 148 of file pnmImageHeader.h.


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