Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPNGReadStream Class Reference

Public Member Functions

 KisPNGReadStream (quint8 *buf, quint32 depth)
 
int nextValue ()
 

Private Attributes

quint8 * m_buf
 
quint32 m_depth
 
quint32 m_posinc
 

Detailed Description

Definition at line 290 of file kis_png_converter.cpp.

Constructor & Destructor Documentation

◆ KisPNGReadStream()

KisPNGReadStream::KisPNGReadStream ( quint8 * buf,
quint32 depth )
inline

Definition at line 293 of file kis_png_converter.cpp.

293 : m_posinc(8), m_depth(depth), m_buf(buf) {
294 }

Member Function Documentation

◆ nextValue()

int KisPNGReadStream::nextValue ( )
inline

Definition at line 295 of file kis_png_converter.cpp.

295 {
296 if (m_posinc == 0) {
297 m_posinc = 8;
298 m_buf++;
299 }
300 m_posinc -= m_depth;
301 return (((*m_buf) >> (m_posinc)) & ((1 << m_depth) - 1));
302 }

References m_buf, m_depth, and m_posinc.

Member Data Documentation

◆ m_buf

quint8* KisPNGReadStream::m_buf
private

Definition at line 305 of file kis_png_converter.cpp.

◆ m_depth

quint32 KisPNGReadStream::m_depth
private

Definition at line 304 of file kis_png_converter.cpp.

◆ m_posinc

quint32 KisPNGReadStream::m_posinc
private

Definition at line 304 of file kis_png_converter.cpp.


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