#include <fg_GraphicVector.h>
Public Member Functions | |
FG_GraphicVector () | |
virtual | ~FG_GraphicVector () |
virtual FGType | getType (void) const |
virtual const std::string & | getMimeType (void) const |
virtual FG_ConstGraphicPtr | clone (void) const |
virtual double | getWidth (void) const |
virtual double | getHeight (void) const |
virtual const char * | getDataId (void) const |
virtual const char * | createDataItem (PD_Document *pDoc, const char *szName) const |
virtual GR_Image * | generateImage (GR_Graphics *pG, const PP_AttrProp *pSpanAP, UT_sint32 maxW, UT_sint32 maxH) |
virtual GR_Image * | regenerateImage (GR_Graphics *pG) |
virtual UT_Error | insertIntoDocument (PD_Document *pDoc, UT_uint32 res, UT_uint32 iPos, const char *szName) const |
virtual UT_Error | insertAtStrux (PD_Document *pDoc, UT_uint32 res, UT_uint32 iPos, PTStruxType iStruxType, const char *szName) const |
bool | setVector_SVG (const UT_ConstByteBufPtr &pBB) |
const UT_ConstByteBufPtr & | getBuffer (void) const |
virtual const char * | getWidthProp (void) |
virtual const char * | getHeightProp (void) |
Static Public Member Functions | |
static FG_GraphicPtr | createFromChangeRecord (const fl_ContainerLayout *pFL, const PX_ChangeRecord_Object *pcro) |
static FG_GraphicPtr | createFromStrux (const fl_ContainerLayout *pFL) |
Protected Attributes | |
UT_ConstByteBufPtr | m_pbbSVG |
UT_sint32 | m_iWidth |
UT_sint32 | m_iHeight |
UT_sint32 | m_iMaxW |
UT_sint32 | m_iMaxH |
const PP_AttrProp * | m_pSpanAP |
const gchar * | m_pszDataID |
FG_GraphicVector::FG_GraphicVector | ( | ) |
FG_GraphicVector::~FG_GraphicVector | ( | ) | [virtual] |
FG_ConstGraphicPtr FG_GraphicVector::clone | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References m_iHeight, m_iMaxH, m_iMaxW, m_iWidth, m_pbbSVG, m_pSpanAP, and m_pszDataID.
const char * FG_GraphicVector::createDataItem | ( | PD_Document * | pDoc, | |
const char * | szName | |||
) | const [virtual] |
Implements FG_Graphic.
References PD_Document::createDataItem(), getMimeType(), m_pbbSVG, UT_ASSERT, and UT_return_val_if_fail.
FG_GraphicPtr FG_GraphicVector::createFromChangeRecord | ( | const fl_ContainerLayout * | pFL, | |
const PX_ChangeRecord_Object * | pcro | |||
) | [static] |
Reimplemented from FG_Graphic.
References PX_ChangeRecord_Object::getBlockOffset(), PD_Document::getDataItemDataByName(), fl_Layout::getDocument(), and fl_ContainerLayout::getSpanAP().
FG_GraphicPtr FG_GraphicVector::createFromStrux | ( | const fl_ContainerLayout * | pFL | ) | [static] |
Reimplemented from FG_Graphic.
References fl_ContainerLayout::getAP(), PD_Document::getDataItemDataByName(), fl_Layout::getDocument(), PT_STRUX_IMAGE_DATAID, and UT_convertToPoints().
GR_Image * FG_GraphicVector::generateImage | ( | GR_Graphics * | pG, | |
const PP_AttrProp * | pSpanAP, | |||
UT_sint32 | maxW, | |||
UT_sint32 | maxH | |||
) | [virtual] |
Implements FG_Graphic.
References GR_Graphics::createNewImage(), gchar, GR_Image::getDisplayHeight(), GR_Image::getDisplayWidth(), getMimeType(), PP_AttrProp::getProperty(), GR_Image::GRT_Vector, m_iMaxH, m_iMaxW, m_pbbSVG, m_pSpanAP, m_pszDataID, GR_Image::scaleImageTo(), UT_ASSERT, and UT_convertToLogicalUnits().
Referenced by regenerateImage().
const UT_ConstByteBufPtr & FG_GraphicVector::getBuffer | ( | void | ) | const [virtual] |
Implements FG_Graphic.
virtual const char* FG_GraphicVector::getDataId | ( | void | ) | const [inline, virtual] |
Implements FG_Graphic.
double FG_GraphicVector::getHeight | ( | void | ) | const [virtual] |
Implements FG_Graphic.
const char * FG_GraphicVector::getHeightProp | ( | void | ) | [virtual] |
Return the Height property of the span that contains this image.
Implements FG_Graphic.
References gchar, PP_AttrProp::getProperty(), and m_pSpanAP.
const std::string & FG_GraphicVector::getMimeType | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References s_svg_type.
Referenced by createDataItem(), generateImage(), and insertIntoDocument().
FGType FG_GraphicVector::getType | ( | void | ) | const [virtual] |
Implements FG_Graphic.
double FG_GraphicVector::getWidth | ( | void | ) | const [virtual] |
Implements FG_Graphic.
const char * FG_GraphicVector::getWidthProp | ( | void | ) | [virtual] |
Return the width property of the span that contains this image.
Implements FG_Graphic.
References gchar, PP_AttrProp::getProperty(), and m_pSpanAP.
UT_Error FG_GraphicVector::insertAtStrux | ( | PD_Document * | pDoc, | |
UT_uint32 | res, | |||
UT_uint32 | iPos, | |||
PTStruxType | iStruxType, | |||
const char * | szName | |||
) | const [virtual] |
Insert an image at the strux given. This will become the background image for the container defined by the strux.
Implements FG_Graphic.
References PD_Document::changeStruxFmt(), PD_Document::createDataItem(), DIM_IN, m_iHeight, m_iWidth, m_pbbSVG, PTC_AddFmt, UT_ASSERT, UT_convertInchesToDimensionString(), UT_ERROR, and UT_return_val_if_fail.
UT_Error FG_GraphicVector::insertIntoDocument | ( | PD_Document * | pDoc, | |
UT_uint32 | res, | |||
UT_uint32 | iPos, | |||
const char * | szName | |||
) | const [virtual] |
Implements FG_Graphic.
References PD_Document::createDataItem(), DIM_IN, getMimeType(), PD_Document::insertObject(), m_iHeight, m_iWidth, m_pbbSVG, PTO_Image, UT_ASSERT, UT_convertInchesToDimensionString(), UT_ERROR, and UT_return_val_if_fail.
GR_Image * FG_GraphicVector::regenerateImage | ( | GR_Graphics * | pG | ) | [virtual] |
If either the graphics class or graphics resolution changes, regenerate the image.
Implements FG_Graphic.
References generateImage(), m_iMaxH, m_iMaxW, and m_pSpanAP.
bool FG_GraphicVector::setVector_SVG | ( | const UT_ConstByteBufPtr & | pBB | ) |
References m_iHeight, m_iWidth, m_pbbSVG, and UT_SVG_getDimensions().
UT_sint32 FG_GraphicVector::m_iHeight [protected] |
Referenced by clone(), getHeight(), insertAtStrux(), insertIntoDocument(), and setVector_SVG().
UT_sint32 FG_GraphicVector::m_iMaxH [protected] |
Referenced by clone(), generateImage(), and regenerateImage().
UT_sint32 FG_GraphicVector::m_iMaxW [protected] |
Referenced by clone(), generateImage(), and regenerateImage().
UT_sint32 FG_GraphicVector::m_iWidth [protected] |
Referenced by clone(), getWidth(), insertAtStrux(), insertIntoDocument(), and setVector_SVG().
UT_ConstByteBufPtr FG_GraphicVector::m_pbbSVG [protected] |
Referenced by clone(), createDataItem(), generateImage(), getBuffer(), getHeight(), getWidth(), insertAtStrux(), insertIntoDocument(), and setVector_SVG().
const PP_AttrProp* FG_GraphicVector::m_pSpanAP [protected] |
Referenced by clone(), generateImage(), getHeightProp(), getWidthProp(), and regenerateImage().
const gchar* FG_GraphicVector::m_pszDataID [protected] |
Referenced by clone(), and generateImage().