Dillo
Public Member Functions | List of all members
dw::core::style::StyleImage::ExternalImgRenderer Class Referenceabstract

Useful (but not mandatory) base class for updates of areas with background images. More...

#include <style.hh>

Public Member Functions

void setBuffer (core::Imgbuf *buffer, bool resize)
 Called, when an image buffer is attached. More...
 
void drawRow (int row)
 Called, when data from a row is available and has been copied into the image buffer. More...
 
void finish ()
 Called, when all image data has been retrieved. More...
 
void fatal ()
 Called, when there are problems with the retrieval of image data. More...
 
virtual bool readyToDraw ()=0
 If this method returns false, nothing is done at all. More...
 
virtual void getBgArea (int *x, int *y, int *width, int *height)=0
 Return the area covered by the background image. More...
 
virtual void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef)=0
 Return the "reference area". More...
 
virtual StyleImagegetBackgroundImage ()=0
 
virtual BackgroundRepeat getBackgroundRepeat ()=0
 
virtual BackgroundAttachment getBackgroundAttachment ()=0
 
virtual Length getBackgroundPositionX ()=0
 
virtual Length getBackgroundPositionY ()=0
 
virtual void draw (int x, int y, int width, int height)=0
 Draw (or queue for drawing) an area, which is given in canvas coordinates. More...
 
- Public Member Functions inherited from dw::core::ImgRenderer
virtual ~ImgRenderer ()
 

Detailed Description

Useful (but not mandatory) base class for updates of areas with background images.

Member Function Documentation

virtual void dw::core::style::StyleImage::ExternalImgRenderer::draw ( int  x,
int  y,
int  width,
int  height 
)
pure virtual

Draw (or queue for drawing) an area, which is given in canvas coordinates.

Implemented in dw::Textblock::WordImgRenderer, dw::core::Widget::WidgetImgRenderer, and dw::core::Layout::LayoutImgRenderer.

void dw::core::style::StyleImage::ExternalImgRenderer::drawRow ( int  row)
virtual

Called, when data from a row is available and has been copied into the image buffer.

The implementation will typically queue the respective area for drawing.

Implements dw::core::ImgRenderer.

References dw::core::style::calcBackgroundRelatedValues(), dw::core::style::StyleImage::getImgbufSrc(), dw::core::Imgbuf::getRootHeight(), dw::core::Imgbuf::getRootWidth(), imgbuf, lout::misc::max(), and lout::misc::min().

void dw::core::style::StyleImage::ExternalImgRenderer::fatal ( )
virtual

Called, when there are problems with the retrieval of image data.

The implementation may use this to indicate an error.

Implements dw::core::ImgRenderer.

void dw::core::style::StyleImage::ExternalImgRenderer::finish ( )
virtual

Called, when all image data has been retrieved.

The implementation may use this instead of "drawRow" for drawing, to limit the number of draws.

Implements dw::core::ImgRenderer.

virtual BackgroundAttachment dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundAttachment ( )
pure virtual
virtual StyleImage* dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundImage ( )
pure virtual
virtual Length dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundPositionX ( )
pure virtual
virtual Length dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundPositionY ( )
pure virtual
virtual BackgroundRepeat dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundRepeat ( )
pure virtual
virtual void dw::core::style::StyleImage::ExternalImgRenderer::getBgArea ( int *  x,
int *  y,
int *  width,
int *  height 
)
pure virtual
virtual void dw::core::style::StyleImage::ExternalImgRenderer::getRefArea ( int *  xRef,
int *  yRef,
int *  widthRef,
int *  heightRef 
)
pure virtual

Return the "reference area".

See comment of "drawBackground".

Implemented in dw::Textblock::WordImgRenderer, dw::core::Widget::WidgetImgRenderer, and dw::core::Layout::LayoutImgRenderer.

virtual bool dw::core::style::StyleImage::ExternalImgRenderer::readyToDraw ( )
pure virtual

If this method returns false, nothing is done at all.

Implemented in dw::Textblock::WordImgRenderer, dw::core::Widget::WidgetImgRenderer, and dw::core::Layout::LayoutImgRenderer.

void dw::core::style::StyleImage::ExternalImgRenderer::setBuffer ( core::Imgbuf buffer,
bool  resize 
)
virtual

Called, when an image buffer is attached.

This is typically the case when all meta data (size, depth) has been read.

Implements dw::core::ImgRenderer.


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