Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsPNGDecoder Class Reference

#include <nsPNGDecoder.h>

Inheritance diagram for nsPNGDecoder:
Inheritance graph
[legend]
Collaboration diagram for nsPNGDecoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER 
nsPNGDecoder ()
virtual ~nsPNGDecoder ()
void init (in imgILoad aLoad)
 Initalize an image decoder.
void close ()
 Closes the stream.
void flush ()
 Flushes the stream.
unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count)
 Writes data into the stream from an input stream.

Public Attributes

nsCOMPtr< imgIContainermImage
nsCOMPtr< gfxIImageFramemFrame
nsCOMPtr< imgILoadmImageLoad
nsCOMPtr< imgIDecoderObservermObserver
png_structp mPNG
png_infop mInfo
PRUint8colorLine
PRUint8alphaLine
PRUint8interlacebuf
PRUint32 ibpr
PRPackedBool mError

Detailed Description

Definition at line 63 of file nsPNGDecoder.h.


Constructor & Destructor Documentation

Definition at line 76 of file nsPNGDecoder.cpp.

{
  if (colorLine)
    nsMemory::Free(colorLine);
  if (alphaLine)
    nsMemory::Free(alphaLine);
  if (interlacebuf)
    nsMemory::Free(interlacebuf);
}

Member Function Documentation

void imgIDecoder::close ( ) [inherited]

Closes the stream.

void imgIDecoder::flush ( ) [inherited]

Flushes the stream.

void imgIDecoder::init ( in imgILoad  aLoad) [inherited]

Initalize an image decoder.

Parameters:
aRequestthe request that owns the decoder.
Note:
The decode should QI aLoad to an imgIDecoderObserver and should send decoder notifications to the request. The decoder should always pass NULL as the first two parameters to all of the imgIDecoderObserver APIs.
unsigned long imgIDecoder::writeFrom ( in nsIInputStream  inStr,
in unsigned long  count 
) [inherited]

Writes data into the stream from an input stream.

Implementer's note: This method is defined by this interface in order to allow the output stream to efficiently copy the data from the input stream into its internal buffer (if any). If this method was provide as an external facility, a separate char* buffer would need to be used in order to call the output stream's other Write method.

Parameters:
fromStreamthe stream from which the data is read
countthe maximun number of bytes to write
Returns:
aWriteCount out parameter to hold the number of bytes written. if an error occurs, the writecount is undefined

Member Data Documentation

Definition at line 80 of file nsPNGDecoder.h.

Definition at line 80 of file nsPNGDecoder.h.

Definition at line 82 of file nsPNGDecoder.h.

Definition at line 81 of file nsPNGDecoder.h.

Definition at line 83 of file nsPNGDecoder.h.

Definition at line 74 of file nsPNGDecoder.h.

Definition at line 73 of file nsPNGDecoder.h.

Definition at line 75 of file nsPNGDecoder.h.

Definition at line 79 of file nsPNGDecoder.h.

Definition at line 76 of file nsPNGDecoder.h.

Definition at line 78 of file nsPNGDecoder.h.


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