Dillo v3.1.1-111-gd4f56d0d
|
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. | |
void | drawRow (int row) |
Called, when data from a row is available and has been copied into the image buffer. | |
void | finish () |
Called, when all image data has been retrieved. | |
void | fatal () |
Called, when there are problems with the retrieval of image data. | |
virtual bool | readyToDraw ()=0 |
If this method returns false, nothing is done at all. | |
virtual void | getBgArea (int *x, int *y, int *width, int *height)=0 |
Return the area covered by the background image. | |
virtual void | getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef)=0 |
Return the "reference area". | |
virtual StyleImage * | getBackgroundImage ()=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. | |
Public Member Functions inherited from dw::core::ImgRenderer | |
virtual | ~ImgRenderer () |
Useful (but not mandatory) base class for updates of areas with background images.
|
pure virtual |
Draw (or queue for drawing) an area, which is given in canvas coordinates.
Implemented in dw::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, and dw::core::Widget::WidgetImgRenderer.
|
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.
Definition at line 651 of file style.cc.
References dw::core::style::calcBackgroundRelatedValues(), dw::core::style::drawBackgroundLineByLine, dw::core::style::StyleImage::getImgbufSrc(), dw::core::Imgbuf::getRootWidth(), imgbuf, lout::misc::max(), and lout::misc::min().
|
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.
|
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.
Definition at line 699 of file style.cc.
References dw::core::style::drawBackgroundLineByLine.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return the area covered by the background image.
Implemented in dw::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, dw::Textblock::SpaceImgRenderer, and dw::core::Widget::WidgetImgRenderer.
|
pure virtual |
Return the "reference area".
See comment of "drawBackground".
Implemented in dw::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, and dw::core::Widget::WidgetImgRenderer.
|
pure virtual |
If this method returns false, nothing is done at all.
Implemented in dw::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, and dw::core::Widget::WidgetImgRenderer.
|
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.