Public Member Functions | Protected Attributes | Private Member Functions

GR_Win32Image Class Reference

#include <gr_Win32Image.h>

Inheritance diagram for GR_Win32Image:
GR_RasterImage GR_Image

List of all members.

Public Member Functions

 GR_Win32Image (const char *szName)
virtual ~GR_Win32Image ()
virtual bool convertToBuffer (UT_ByteBuf **ppBB) const
virtual bool convertFromBuffer (const UT_ByteBuf *pBB, const std::string &mimetype, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)
void setDIB (BITMAPINFO *pDIB)
BITMAPINFOgetDIB (void) const
virtual GR_ImagecreateImageSegment (GR_Graphics *pG, const UT_Rect &rec)
virtual bool hasAlpha (void) const
virtual bool isTransparentAt (UT_sint32 x, UT_sint32 y)

Protected Attributes

BITMAPINFOm_pDIB

Private Member Functions

bool _convertFromPNG (const UT_ByteBuf *pBB, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)
bool _convertFromJPEG (const UT_ByteBuf *pBB, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)

Constructor & Destructor Documentation

GR_Win32Image::GR_Win32Image ( const char *  szName  ) 

References GR_Image::setName().

Referenced by createImageSegment().

GR_Win32Image::~GR_Win32Image (  )  [virtual]

References m_pDIB.


Member Function Documentation

bool GR_Win32Image::_convertFromJPEG ( const UT_ByteBuf pBB,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [private]
bool GR_Win32Image::_convertFromPNG ( const UT_ByteBuf pBB,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [private]
bool GR_Win32Image::convertFromBuffer ( const UT_ByteBuf pBB,
const std::string &  mimetype,
UT_sint32  iDisplayWidth,
UT_sint32  iDisplayHeight 
) [virtual]
bool GR_Win32Image::convertToBuffer ( UT_ByteBuf **  ppBB  )  const [virtual]
GR_Image * GR_Win32Image::createImageSegment ( GR_Graphics pG,
const UT_Rect rec 
) [virtual]

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.

Implements GR_Image.

References UT_String::c_str(), GR_Image::getDisplayHeight(), GR_Image::getDisplayWidth(), GR_Image::getName(), GR_Win32Image(), UT_Rect::height, UT_Rect::left, m_pDIB, GR_Image::setDisplaySize(), GR_Graphics::tdu(), UT_Rect::top, UT_return_val_if_fail, UT_String_sprintf(), and UT_Rect::width.

BITMAPINFO* GR_Win32Image::getDIB ( void   )  const [inline]
bool GR_Win32Image::hasAlpha ( void   )  const [virtual]

Returns true if there is any transparency in the image.

Implements GR_RasterImage.

References UT_ASSERT_HARMLESS.

bool GR_Win32Image::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_HARMLESS.

void GR_Win32Image::setDIB ( BITMAPINFO pDIB  )  [inline]

Member Data Documentation


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