Dillo v3.1.1-111-gd4f56d0d
Loading...
Searching...
No Matches
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.
 
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 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.
 
- 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.

Definition at line 814 of file style.hh.

Member Function Documentation

◆ draw()

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::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, and dw::core::Widget::WidgetImgRenderer.

◆ drawRow()

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.

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().

◆ fatal()

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.

Definition at line 711 of file style.cc.

◆ finish()

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.

Definition at line 699 of file style.cc.

References dw::core::style::drawBackgroundLineByLine.

◆ getBackgroundAttachment()

virtual BackgroundAttachment dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundAttachment ( )
pure virtual

◆ getBackgroundImage()

virtual StyleImage * dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundImage ( )
pure virtual

◆ getBackgroundPositionX()

virtual Length dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundPositionX ( )
pure virtual

◆ getBackgroundPositionY()

virtual Length dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundPositionY ( )
pure virtual

◆ getBackgroundRepeat()

virtual BackgroundRepeat dw::core::style::StyleImage::ExternalImgRenderer::getBackgroundRepeat ( )
pure virtual

◆ getBgArea()

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

◆ getRefArea()

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::core::Layout::LayoutImgRenderer, dw::Textblock::WordImgRenderer, and dw::core::Widget::WidgetImgRenderer.

◆ readyToDraw()

virtual bool dw::core::style::StyleImage::ExternalImgRenderer::readyToDraw ( )
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.

◆ setBuffer()

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.

Definition at line 645 of file style.cc.


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