#include <djv_renderer.h>
Public Member Functions | |
virtual void | render (u8 *ioImagePtr, ssize_t inRowStride, Photometric inPm, const Rect &inRect, size_t inRescaledWidth, size_t inRescaledHeight, const u8 *inForeground, ssize_t inForeRowStride, size_t inForeWidth, size_t inForeHeight, size_t inForeX, size_t inForeY, bool inUseFastRescaling) const |
Public Member Functions inherited from Celartem::DjVu::Renderer | |
virtual bool | addChunk (const Chunk *inChunk)=0 |
virtual size_t | getWidth () const =0 |
virtual size_t | getHeight () const =0 |
virtual Photometric | getPhotometric () const =0 |
virtual size_t | getBitsPerComponent () const =0 |
virtual size_t | getDpi () const =0 |
virtual String | getChunkId () const =0 |
virtual Referable * | getInternalRenderer () const =0 |
virtual | ~Renderer () |
Public Member Functions inherited from Celartem::Referable | |
Referable () | |
void | addRef () const |
void | releaseRef () const |
size_t | getReferenceCount () const |
Protected Member Functions | |
virtual const void * | lockSource (ssize_t &outSrcRowStride, const Rect &inSrcRect, Photometric inPhotometric) const =0 |
virtual void | unlockSource () const =0 |
Additional Inherited Members | |
Static Public Member Functions inherited from Celartem::DjVu::Renderer | |
static AutoPtr< Renderer > | create (const Chunk *inChunk, const Dictionary *inDictionary) |
Static Public Member Functions inherited from Celartem::Referable | |
static void | dumpDbgAllRefCount () |
ImageRenderer class provides a partial stock implementation for foreground/background image renderer.
All you have to do is to implement lockSource and unlockSource functions.
|
protectedpure virtual |
Lock a portion of the source image.
outSrcRowStride | On return, it preserves row-stride of the locked image. |
inSrcRect | Portion of the source image to render. |
inPhotometric | Photometric of the output. |
|
inlinevirtual |
Renders a portion of the mask.
ioImagePtr | Pointer to a buffer which receives the rendered image. If this call renders a mask, the buffer already has background image or filled with some color. |
inRowStride | The row-stride of the image. |
inPm | The photometric of the image. |
inRect | Rectangle to draw in the rescaled image coordination. |
inRescaledWidth | The virtual width of the rescaled page image. This method renders page image as if it had this width. If 0 is specified, the rendered image is same size to the original page size. |
inRescaledHeight | The virtual height of the rescaled page image. This method renders page image as if it had this height. If 0 is specified, the rendered image is same size to the original page size. |
inForeground | Optional pointer to the foreground image. If this is NULL , then all the foreground related parameters are ignored and then the mask is painted with its own palette.This parameter is only used if the Renderer instance is used for a mask and there's a foreground to stencil. |
inForeRowStride | The row-stride of the foreground image. This parameter is only used if the Renderer instance is used for a mask and there's a foreground to stencil. |
inForeWidth | The full width of the foreground image. This parameter is only used if the Renderer instance is used for a mask and there's a foreground to stencil. |
inForeHeight | The full height of the foreground image. This parameter is only used if the Renderer instance is used for a mask and there's a foreground to stencil. |
inForeX | The left position, where the foreground rendering starts. The mask pixel X corresponds to the foreground pixel (X + inForeX) * inForeWidth / inRescaledWidth. |
inForeY | The top position, where the foreground rendering starts. The mask pixel Y corresponds to the foreground pixel (Y + inForeY) * inForeHeight / inRescaledHeight. |
inUseFastRescaling | Determine whether to use fast rescaling algorithm or not. The default is not to use fast rescaling algorithm. |
Implements Celartem::DjVu::Renderer.
|
protectedpure virtual |
Unlock the previously locked portion of the source image.