#include <gr_Image.h>

| enum GR_Image::GRType |
| GR_Image::GR_Image | ( | ) |
| GR_Image::~GR_Image | ( | ) | [virtual] |
References DestroyOutline().
| UT_sint32 GR_Image::getDisplayWidth | ( | void | ) | const [virtual] |
Returns the width of the image. Values in in device units.
References m_iDisplayWidth.
Referenced by fp_ImageRun::_lookupProperties(), GR_Win32Image::createImageSegment(), GR_UnixImage::createImageSegment(), GR_CocoaImage::createImageSegment(), GR_Win32Graphics::drawImage(), GR_UnixPangoGraphics::drawImage(), GR_CocoaGraphics::drawImage(), Presentation::drawNthPage(), GenerateOutline(), GetOffsetFromLeft(), GetOffsetFromRight(), render_init(), XAP_Win32Dialog_About::s_dlgProc(), and GR_UnixImage::scaleImageTo().
| UT_sint32 GR_Image::getDisplayHeight | ( | void | ) | const [virtual] |
Returns the height of the image. Values in in device units.
References m_iDisplayHeight.
Referenced by fp_ImageRun::_lookupProperties(), GR_Win32Image::createImageSegment(), GR_UnixImage::createImageSegment(), GR_CocoaImage::createImageSegment(), GR_Win32Graphics::drawImage(), GR_UnixPangoGraphics::drawImage(), GR_CocoaGraphics::drawImage(), Presentation::drawNthPage(), GenerateOutline(), render_init(), XAP_Win32Dialog_About::s_dlgProc(), and GR_UnixImage::scaleImageTo().
| bool GR_Image::convertToBuffer | ( | UT_ByteBuf ** | ppBB | ) | const [virtual] |
Reimplemented in GR_CocoaImage, GR_CairoImage, GR_UnixImage, GR_Win32Image, and GR_VectorImage.
Referenced by GR_MathManager::createPNGSnapshot(), GR_GOComponentManager::createPNGSnapshot(), GR_GOChartManager::createPNGSnapshot(), GR_MathManager::updatePNGSnapshot(), GR_GOComponentManager::updatePNGSnapshot(), and GR_GOChartManager::updatePNGSnapshot().
| bool GR_Image::convertFromBuffer | ( | const UT_ByteBuf * | pBB, | |
| UT_sint32 | iDisplayWidth, | |||
| UT_sint32 | iDisplayHeight | |||
| ) | [virtual] |
Reimplemented in GR_CocoaImage, GR_UnixImage, GR_Win32Image, and GR_VectorImage.
References UT_ASSERT_NOT_REACHED.
Referenced by GR_Win32Graphics::createNewImage(), GR_UnixPangoGraphics::createNewImage(), and GR_CocoaGraphics::createNewImage().
| virtual GR_Image* GR_Image::createImageSegment | ( | GR_Graphics * | pG, | |
| const UT_Rect & | rec | |||
| ) | [pure virtual] |
This should be overridden by platform code. The idea is to create a new image from the rectangular segment in device units defined by UT_Rect rec. The Image should be deleted by the calling routine.
Implemented in GR_CocoaImage, GR_UnixImage, GR_Win32Image, and GR_VectorImage.
Referenced by FV_FrameEdit::drawFrame(), and GR_Graphics::fillRect().
| void GR_Image::scaleImageTo | ( | GR_Graphics * | pG, | |
| const UT_Rect & | rec | |||
| ) | [virtual] |
Scale our image to rectangle given by rec. The dimensions of rec are calculated in logical units. Overriden by platform implementation if needed. Default is to set display size.
Reimplemented in GR_UnixImage.
References UT_Rect::height, setDisplaySize(), GR_Graphics::tdu(), and UT_Rect::width.
Referenced by fg_FillType::_regenerateImage(), fl_DocSectionLayout::addOwnedPage(), fl_SectionLayout::checkGraphicTick(), GOComponentView::render(), GOChartView::render(), fl_CellLayout::setCellContainerProperties(), fl_FrameLayout::setContainerProperties(), fg_FillType::setHeight(), fg_FillType::setWidth(), and fg_FillType::setWidthHeight().
| void GR_Image::getName | ( | char * | szName | ) | const |
References UT_String::c_str(), m_szName, and UT_ASSERT.
Referenced by GR_Win32Image::createImageSegment(), GR_UnixImage::createImageSegment(), and GR_CocoaImage::createImageSegment().
| virtual bool GR_Image::hasAlpha | ( | void | ) | const [pure virtual] |
Returns true if the image has any alpha in it.
Implemented in GR_CocoaImage, GR_CairoImage, GR_UnixImage, GR_Win32Image, GR_RasterImage, and GR_VectorImage.
Referenced by GetOffsetFromLeft(), and GetOffsetFromRight().
Returns true if pixel at point (x,y) in device units is transparent.
Implemented in GR_CocoaImage, GR_CairoImage, GR_UnixImage, GR_Win32Image, GR_RasterImage, and GR_VectorImage.
Referenced by GenerateOutline().
| void GR_Image::GenerateOutline | ( | void | ) |
Generate an outline of an image with transparency. This is a collection of (x,y) points marking the first non-transparent point from the left and right side of the image. This outline is used by GetOffsetFromLeft and facitates "tight" text wrapping around objects.
References UT_GenericVector< T >::addItem(), DestroyOutline(), getDisplayHeight(), getDisplayWidth(), isTransparentAt(), GR_Image_Point::m_iX, GR_Image_Point::m_iY, and m_vecOutLine.
Referenced by GetOffsetFromLeft(), and GetOffsetFromRight().
| void GR_Image::DestroyOutline | ( | void | ) |
Destroy the outline
References m_vecOutLine, and UT_VECTOR_PURGEALL.
Referenced by GenerateOutline(), and ~GR_Image().
| UT_sint32 GR_Image::GetOffsetFromLeft | ( | GR_Graphics * | pG, | |
| UT_sint32 | pad, | |||
| UT_sint32 | yTop, | |||
| UT_sint32 | height | |||
| ) |
Return the distance from the left side of the image that is "pad" distance to the nearest point in the transparent outline from the line segment start at Y and running for distance Height below it. All distances are in logical units. ----------------- | | | * | | ***** | |||||| *** | | | ** | |---------------| | | | |
This case would give a -ve distance. The input yTop is in logical units as measured from the top of the image. If y is above the image it should be negative. The returned value is in logical units.
References d, GenerateOutline(), getDisplayWidth(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), hasAlpha(), isOutLinePresent(), GR_Image_Point::m_iX, GR_Image_Point::m_iY, m_vecOutLine, GR_Graphics::tdu(), and GR_Graphics::tlu().
Referenced by fp_FrameContainer::getLeftPad(), and fp_FrameContainer::overlapsRect().
| UT_sint32 GR_Image::GetOffsetFromRight | ( | GR_Graphics * | pG, | |
| UT_sint32 | pad, | |||
| UT_sint32 | yTop, | |||
| UT_sint32 | height | |||
| ) |
Return the distance from the right side of the image that is "pad" distance to the nearest point in the transparent outline from the line segment start at Y and running for distance Height below it. All distances are in logical units. ----------------- | | | * | | ***** | | *** |||||||| | ** | | |------------|--| | | | | This distance is negative The input yTop is in logical units as measured from the top of the image. If y is above the image it should be negative. The returned value is in logical units.
References d, GenerateOutline(), getDisplayWidth(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), hasAlpha(), isOutLinePresent(), GR_Image_Point::m_iX, GR_Image_Point::m_iY, m_vecOutLine, GR_Graphics::tdu(), GR_Graphics::tlu(), and xxx_UT_DEBUGMSG.
Referenced by fp_FrameContainer::getRightPad(), and fp_FrameContainer::overlapsRect().
| bool GR_Image::isOutLinePresent | ( | void | ) | const [inline] |
Referenced by GetOffsetFromLeft(), and GetOffsetFromRight().
| GR_Image::GRType GR_Image::getBufferType | ( | const UT_ByteBuf * | pBB | ) | [static] |
References UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), GRT_Raster, GRT_Unknown, GRT_Vector, and UT_SVG_recognizeContent().
Referenced by GR_Graphics::createNewImage().
| GR_Image::GRType GR_Image::getType | ( | void | ) | const [virtual] |
Reimplemented in GR_CocoaImage, GR_CairoImage, GR_UnixImage, GR_RasterImage, and GR_VectorImage.
References GRT_Raster.
Referenced by GR_Win32Graphics::drawImage(), and GR_CocoaGraphics::drawImage().
| bool GR_Image::render | ( | GR_Graphics * | pGR, | |
| UT_sint32 | iDisplayWidth, | |||
| UT_sint32 | iDisplayHeight | |||
| ) | [virtual] |
Reimplemented in GR_CocoaImage, and GR_VectorImage.
References UT_ASSERT_NOT_REACHED.
Referenced by GR_Win32Graphics::drawImage(), GR_Graphics::drawImage(), and GR_CocoaGraphics::drawImage().
Sets the display dimentions of the image. This does not perform any scaling on the image, it just stores the values. Values in device units.
References m_iDisplayHeight, and m_iDisplayWidth.
Referenced by GR_CocoaImage::_convertPNGFromBuffer(), GR_Win32Image::convertFromBuffer(), GR_VectorImage::convertFromBuffer(), GR_UnixImage::convertFromBuffer(), GR_CocoaImage::convertFromBuffer(), GR_Win32Image::createImageSegment(), GR_UnixImage::createImageSegment(), GR_UnixPangoGraphics::genImageFromRectangle(), GR_UnixImage::GR_UnixImage(), GR_UnixImage::scale(), scaleImageTo(), GR_Win32Image::setDIB(), and GR_CocoaImage::setFromImageRep().
| void GR_Image::setName | ( | const char * | szName | ) | [protected] |
References m_szName.
Referenced by GR_CairoImage::GR_CairoImage(), GR_CocoaImage::GR_CocoaImage(), GR_UnixImage::GR_UnixImage(), GR_VectorImage::GR_VectorImage(), and GR_Win32Image::GR_Win32Image().
UT_String GR_Image::m_szName [private] |
UT_sint32 GR_Image::m_iDisplayWidth [private] |
Referenced by getDisplayWidth(), and setDisplaySize().
UT_sint32 GR_Image::m_iDisplayHeight [private] |
Referenced by getDisplayHeight(), and setDisplaySize().
UT_GenericVector<GR_Image_Point *> GR_Image::m_vecOutLine [private] |
Referenced by DestroyOutline(), GenerateOutline(), GetOffsetFromLeft(), and GetOffsetFromRight().
1.5.5