Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

GR_CocoaImage Class Reference

#include <gr_CocoaImage.h>

Inheritance diagram for GR_CocoaImage:
GR_CairoRasterImage GR_RasterImage GR_Image

List of all members.

Public Member Functions

 GR_CocoaImage (const char *pszName)
virtual ~GR_CocoaImage ()
virtual bool convertToBuffer (UT_ConstByteBufPtr &ppBB) const
virtual bool convertFromBuffer (const UT_ConstByteBufPtr &pBB, const std::string &mimetype, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)
virtual bool hasAlpha (void) const
virtual bool isTransparentAt (UT_sint32 x, UT_sint32 y)
virtual GRType getType () const
virtual bool render (GR_Graphics *pGR, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)
virtual void cairoSetSource (cairo_t *)
void setSurface (cairo_surface_t *)

Static Public Member Functions

static NSImage * imageFromPNG (NSData *data, UT_uint32 &image_width, UT_uint32 &image_height)

Protected Member Functions

virtual GR_CairoRasterImagemakeSubimage (const std::string &n, UT_sint32 x, UT_sint32 y, UT_sint32 w, UT_sint32 h) const

Private Member Functions

bool _convertPNGFromBuffer (const UT_ByteBuf *pBB, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)

Private Attributes

cairo_surface_t * m_surface
GRType m_grtype

Constructor & Destructor Documentation

GR_CocoaImage::GR_CocoaImage ( const char *  pszName  ) 

References GR_Image::setName().

Referenced by makeSubimage().

GR_CocoaImage::~GR_CocoaImage (  )  [virtual]

References m_surface.


Member Function Documentation

bool GR_CocoaImage::_convertPNGFromBuffer ( const UT_ByteBuf pBB,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [private]
void GR_CocoaImage::cairoSetSource ( cairo_t *  cr  )  [virtual]
bool GR_CocoaImage::convertFromBuffer ( const UT_ConstByteBufPtr pBB,
const std::string &  mimetype,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [virtual]
bool GR_CocoaImage::convertToBuffer ( UT_ConstByteBufPtr ppBB  )  const [virtual]

Implements GR_Image.

References UT_ASSERT.

virtual GRType GR_CocoaImage::getType ( void   )  const [inline, virtual]

Reimplemented from GR_RasterImage.

References m_grtype.

bool GR_CocoaImage::hasAlpha ( void   )  const [virtual]

Returns true if there is any transparency in the image.

Implements GR_RasterImage.

References m_surface.

static NSImage* GR_CocoaImage::imageFromPNG ( NSData data,
UT_uint32 image_width,
UT_uint32 image_height 
) [static]
bool GR_CocoaImage::isTransparentAt ( UT_sint32  x,
UT_sint32  y 
) [virtual]

Returns true if pixel at point (x,y) in device units is transparent. See gr_UnixImage.cpp for how it's done in GTK.

Implements GR_RasterImage.

References UT_ASSERT.

GR_CairoRasterImage * GR_CocoaImage::makeSubimage ( const std::string &  n,
UT_sint32  x,
UT_sint32  y,
UT_sint32  w,
UT_sint32  h 
) const [protected, virtual]
bool GR_CocoaImage::render ( GR_Graphics pGR,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [virtual]

Reimplemented from GR_Image.

References UT_DEBUGMSG.

void GR_CocoaImage::setSurface ( cairo_surface_t *  surface  ) 

References m_surface.

Referenced by makeSubimage().


Member Data Documentation


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