#include <fg_GraphicRaster.h>
FG_GraphicRaster::FG_GraphicRaster | ( | ) |
References xxx_UT_DEBUGMSG.
Referenced by createFromStrux().
FG_GraphicRaster::~FG_GraphicRaster | ( | ) | [virtual] |
References xxx_UT_DEBUGMSG.
FG_ConstGraphicPtr FG_GraphicRaster::clone | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References m_format, m_iHeight, m_iMaxH, m_iMaxW, m_iWidth, m_pbb, m_pSpanAP, and m_pszDataID.
const char * FG_GraphicRaster::createDataItem | ( | PD_Document * | pDoc, | |
const char * | szName | |||
) | const [virtual] |
Implements FG_Graphic.
References PD_Document::createDataItem(), getMimeType(), m_pbb, UT_ASSERT, and UT_return_val_if_fail.
FG_GraphicPtr FG_GraphicRaster::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_GraphicRaster::createFromStrux | ( | const fl_ContainerLayout * | pFL | ) | [static] |
Reimplemented from FG_Graphic.
References FG_GraphicRaster(), fl_ContainerLayout::getAP(), PD_Document::getDataItemDataByName(), fl_Layout::getDocument(), PT_STRUX_IMAGE_DATAID, and UT_convertToPoints().
Referenced by AP_Dialog_FormatTable::setCurCellProps(), and AP_Dialog_FormatFrame::setCurFrameProps().
GR_Image * FG_GraphicRaster::generateImage | ( | GR_Graphics * | pG, | |
const PP_AttrProp * | pSpanAP, | |||
UT_sint32 | maxW, | |||
UT_sint32 | maxH | |||
) | [virtual] |
Implements FG_Graphic.
References GR_Graphics::createNewImage(), gchar, getMimeType(), PP_AttrProp::getProperty(), GR_Image::GRT_Raster, JPEG_FORMAT, m_format, m_iMaxH, m_iMaxW, m_pbb, m_pSpanAP, m_pszDataID, PNG_FORMAT, GR_Graphics::tlu(), UT_ASSERT, UT_convertToLogicalUnits(), UT_JPEG_getDimensions(), UT_PNG_getDimensions(), and UT_SHOULD_NOT_HAPPEN.
Referenced by regenerateImage().
const UT_ConstByteBufPtr & FG_GraphicRaster::getBuffer | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References m_pbb.
const char * FG_GraphicRaster::getDataId | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References m_pszDataID.
Format FG_GraphicRaster::getFormat | ( | ) | const [inline] |
double FG_GraphicRaster::getHeight | ( | void | ) | const [virtual] |
Implements FG_Graphic.
const char * FG_GraphicRaster::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_GraphicRaster::getMimeType | ( | void | ) | const [virtual] |
Implements FG_Graphic.
References JPEG_FORMAT, m_format, PNG_FORMAT, s_jpeg_type, s_none, and s_png_type.
Referenced by createDataItem(), generateImage(), insertAtStrux(), and insertIntoDocument().
FGType FG_GraphicRaster::getType | ( | void | ) | const [virtual] |
Implements FG_Graphic.
double FG_GraphicRaster::getWidth | ( | void | ) | const [virtual] |
Implements FG_Graphic.
const char * FG_GraphicRaster::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_GraphicRaster::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, getMimeType(), m_iHeight, m_iWidth, m_pbb, PTC_AddFmt, UT_ASSERT, UT_convertInchesToDimensionString(), UT_ERROR, and UT_return_val_if_fail.
UT_Error FG_GraphicRaster::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_pbb, PTO_Image, UT_ASSERT, UT_convertInchesToDimensionString(), UT_ERROR, and UT_return_val_if_fail.
GR_Image * FG_GraphicRaster::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_GraphicRaster::setRaster_JPEG | ( | const UT_ConstByteBufPtr & | pBB | ) |
References m_format, m_iHeight, m_iWidth, m_pbb, and UT_JPEG_getDimensions().
bool FG_GraphicRaster::setRaster_PNG | ( | const UT_ConstByteBufPtr & | pBB | ) |
References m_format, m_iHeight, m_iWidth, m_pbb, and UT_PNG_getDimensions().
Format FG_GraphicRaster::m_format [protected] |
Referenced by clone(), generateImage(), getMimeType(), setRaster_JPEG(), and setRaster_PNG().
UT_sint32 FG_GraphicRaster::m_iHeight [protected] |
Referenced by clone(), getHeight(), insertAtStrux(), insertIntoDocument(), setRaster_JPEG(), and setRaster_PNG().
UT_sint32 FG_GraphicRaster::m_iMaxH [protected] |
Referenced by clone(), generateImage(), and regenerateImage().
UT_sint32 FG_GraphicRaster::m_iMaxW [protected] |
Referenced by clone(), generateImage(), and regenerateImage().
UT_sint32 FG_GraphicRaster::m_iWidth [protected] |
Referenced by clone(), getWidth(), insertAtStrux(), insertIntoDocument(), setRaster_JPEG(), and setRaster_PNG().
UT_ConstByteBufPtr FG_GraphicRaster::m_pbb [protected] |
Referenced by clone(), createDataItem(), generateImage(), getBuffer(), getHeight(), getWidth(), insertAtStrux(), insertIntoDocument(), setRaster_JPEG(), and setRaster_PNG().
const PP_AttrProp* FG_GraphicRaster::m_pSpanAP [protected] |
Referenced by clone(), generateImage(), getHeightProp(), getWidthProp(), and regenerateImage().
const gchar* FG_GraphicRaster::m_pszDataID [protected] |
Referenced by clone(), generateImage(), and getDataId().