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 287 of file kis_png_converter.cpp.

Constructor & Destructor Documentation

◆ KisPNGReadStream()

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

Definition at line 290 of file kis_png_converter.cpp.

290 : m_posinc(8), m_depth(depth), m_buf(buf) {
291 }

Member Function Documentation

◆ nextValue()

int KisPNGReadStream::nextValue ( )
inline

Definition at line 292 of file kis_png_converter.cpp.

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

References m_buf, m_depth, and m_posinc.

Member Data Documentation

◆ m_buf

quint8* KisPNGReadStream::m_buf
private

Definition at line 302 of file kis_png_converter.cpp.

◆ m_depth

quint32 KisPNGReadStream::m_depth
private

Definition at line 301 of file kis_png_converter.cpp.

◆ m_posinc

quint32 KisPNGReadStream::m_posinc
private

Definition at line 301 of file kis_png_converter.cpp.


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