Public Member Functions | Private Member Functions | Private Attributes

IE_ImpGraphic_GdkPixbuf Class Reference

#include <ie_impGraphic_GdkPixbuf.h>

Inheritance diagram for IE_ImpGraphic_GdkPixbuf:
IE_ImpGraphic

List of all members.

Public Member Functions

 IE_ImpGraphic_GdkPixbuf ()
virtual ~IE_ImpGraphic_GdkPixbuf ()
virtual UT_Error importGraphic (UT_ByteBuf *pBB, FG_Graphic **ppfg)

Private Member Functions

GdkPixbuf * pixbufForByteBuf (UT_ByteBuf *pBB, std::string &mimetype)
void _createPNGFromPixbuf (GdkPixbuf *pixbuf)
UT_Error _png_write (GdkPixbuf *pixbuf)
 needed for the stejmp context
GdkPixbuf * _loadXPM (UT_ByteBuf *pBB)
UT_Error Initialize_PNG (void)

Private Attributes

png_structp m_pPNG
png_infop m_pPNGInfo
UT_ByteBufm_pPngBB
bool m_bIsXPM

Constructor & Destructor Documentation

IE_ImpGraphic_GdkPixbuf::IE_ImpGraphic_GdkPixbuf (  ) 
IE_ImpGraphic_GdkPixbuf::~IE_ImpGraphic_GdkPixbuf (  )  [virtual]

Member Function Documentation

void IE_ImpGraphic_GdkPixbuf::_createPNGFromPixbuf ( GdkPixbuf *  pixbuf  )  [private]

This method fills the m_pPNG byte buffer with a PNG representation of of the supplied gdk-pixbuf. This can be saved in the PT as a data-item and recreated. ppBB is a pointer to a pointer of a byte buffer. It's the callers job to delete it.

References m_pPNG, m_pPNGInfo, and UT_DEBUGMSG.

Referenced by _png_write().

GdkPixbuf * IE_ImpGraphic_GdkPixbuf::_loadXPM ( UT_ByteBuf pBB  )  [private]

Massage the byte buffer into an array of strings that can be loaded by gdk-pixbuf

References UT_GenericVector< T >::addItem(), DELETEP, FREEP, UT_GenericVector< T >::getItemCount(), UT_ByteBuf::getLength(), UT_GenericVector< T >::getNthItem(), UT_ByteBuf::getPointer(), and UT_calloc().

Referenced by pixbufForByteBuf().

UT_Error IE_ImpGraphic_GdkPixbuf::_png_write ( GdkPixbuf *  pixbuf  )  [private]

needed for the stejmp context

References _createPNGFromPixbuf(), DELETEP, m_pPNG, m_pPngBB, and m_pPNGInfo.

Referenced by importGraphic().

UT_Error IE_ImpGraphic_GdkPixbuf::importGraphic ( UT_ByteBuf pBB,
FG_Graphic **  ppfg 
) [virtual]

Convert an image data buffer into PNG image buffer.

Reimplemented from IE_ImpGraphic.

References _png_write(), DELETEP, Initialize_PNG(), m_pPngBB, pixbufForByteBuf(), FG_GraphicRaster::setRaster_JPEG(), FG_GraphicRaster::setRaster_PNG(), UT_DEBUGMSG, and UT_OK.

UT_Error IE_ImpGraphic_GdkPixbuf::Initialize_PNG ( void   )  [private]

References _write_png(), m_pPNG, m_pPngBB, and m_pPNGInfo.

Referenced by importGraphic().

GdkPixbuf * IE_ImpGraphic_GdkPixbuf::pixbufForByteBuf ( UT_ByteBuf pBB,
std::string &  mimetype 
) [private]

Member Data Documentation


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