Public Member Functions | Private Member Functions | Private Attributes

GR_RSVGVectorImage Class Reference

#include <gr_CairoImage.h>

Inheritance diagram for GR_RSVGVectorImage:
GR_CairoVectorImage GR_VectorImage GR_Image

List of all members.

Public Member Functions

 GR_RSVGVectorImage (const char *name)
virtual ~GR_RSVGVectorImage ()
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 void cairoSetSource (cairo_t *cr)
virtual void scaleImageTo (GR_Graphics *pG, const UT_Rect &rec)
virtual bool hasAlpha (void) const
virtual bool isTransparentAt (UT_sint32 x, UT_sint32 y)
virtual GR_ImagecreateImageSegment (GR_Graphics *pG, const UT_Rect &rec)

Private Member Functions

void reset ()
void setupScale (UT_sint32 w, UT_sint32 h)
void createSurface (cairo_t *cairo)
void createImageSurface ()
void renderToSurface (cairo_surface_t *surf)
void renderToCairo (cairo_t *cr)

Private Attributes

UT_ByteBufPtr m_data
RsvgDimensionData m_size
cairo_t * m_graphics
cairo_surface_t * m_surface
cairo_surface_t * m_image_surface
RsvgHandle * m_svg
double m_scaleX
double m_scaleY
bool m_needsNewSurface

Constructor & Destructor Documentation

GR_RSVGVectorImage::GR_RSVGVectorImage ( const char *  name  ) 

References GR_Image::setName().

GR_RSVGVectorImage::~GR_RSVGVectorImage (  )  [virtual]

References reset().

Member Function Documentation

void GR_RSVGVectorImage::cairoSetSource ( cairo_t *  cr  )  [virtual]

Implements GR_CairoVectorImage.

References createSurface(), and m_surface.

bool GR_RSVGVectorImage::convertFromBuffer ( const UT_ConstByteBufPtr pBB,
const std::string &  mimetype,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [virtual]

Reimplemented from GR_VectorImage.

References m_data, m_size, m_svg, reset(), and setupScale().

bool GR_RSVGVectorImage::convertToBuffer ( UT_ConstByteBufPtr ppBB  )  const [virtual]

Reimplemented from GR_VectorImage.

References m_data.

GR_Image * GR_RSVGVectorImage::createImageSegment ( GR_Graphics pG,
const UT_Rect rec 
) [virtual]
void GR_RSVGVectorImage::createImageSurface (  )  [private]
void GR_RSVGVectorImage::createSurface ( cairo_t *  cairo  )  [private]
bool GR_RSVGVectorImage::hasAlpha ( void   )  const [virtual]

Reimplemented from GR_VectorImage.

Referenced by isTransparentAt().

bool GR_RSVGVectorImage::isTransparentAt ( UT_sint32  x,
UT_sint32  y 
) [virtual]
void GR_RSVGVectorImage::renderToCairo ( cairo_t *  cr  )  [private, virtual]

Implements GR_CairoVectorImage.

References m_scaleX, m_scaleY, and m_svg.

void GR_RSVGVectorImage::reset ( void   )  [private]
void GR_RSVGVectorImage::scaleImageTo ( GR_Graphics pG,
const UT_Rect rec 
) [virtual]

Reimplemented from GR_Image.

References UT_Rect::height, setupScale(), GR_Graphics::tdu(), and UT_Rect::width.

void GR_RSVGVectorImage::setupScale ( UT_sint32  w,
UT_sint32  h 
) [private]

Member Data Documentation

cairo_t* GR_RSVGVectorImage::m_graphics [private]

Referenced by createSurface(), and reset().

cairo_surface_t* GR_RSVGVectorImage::m_image_surface [private]
RsvgDimensionData GR_RSVGVectorImage::m_size [private]
cairo_surface_t* GR_RSVGVectorImage::m_surface [private]

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