Panda3D
Public Member Functions | List of all members
PNMImage::Row Class Reference

Provides an accessor for reading or writing the contents of one row of the image in-place. More...

Public Member Functions

 __setitem__ (int x, const LColorf v)
 Set the pixel at the given column in the row. If the image has no alpha channel, the alpha component is ignored. More...
 
Xelval getAlphaVal (int x)
 Fetch the alpha value at the given column in the row. More...
 
Xel getXelVal (int x)
 Fetch the pixel at the given column in the row. More...
 
LColorf operator[] (int x)
 
 setAlphaVal (int x, Xelval v)
 Set the alpha value at the given column in the row. More...
 
 setXelVal (int x, const Xel v)
 Set the pixel at the given column in the row. More...
 
size_t size ()
 Get the number of pixels in the row. More...
 

Detailed Description

Provides an accessor for reading or writing the contents of one row of the image in-place.

Member Function Documentation

◆ __setitem__()

__setitem__ ( int  x,
const LColorf  v 
)

Set the pixel at the given column in the row. If the image has no alpha channel, the alpha component is ignored.

◆ getAlphaVal()

Xelval getAlphaVal ( int  x)

Fetch the alpha value at the given column in the row.

◆ getXelVal()

Xel getXelVal ( int  x)

Fetch the pixel at the given column in the row.

◆ operator[]()

LColorf operator[] ( int  x)

◆ setAlphaVal()

setAlphaVal ( int  x,
Xelval  v 
)

Set the alpha value at the given column in the row.

◆ setXelVal()

setXelVal ( int  x,
const Xel  v 
)

Set the pixel at the given column in the row.

◆ size()

size_t size ( )

Get the number of pixels in the row.