Public Member Functions | Protected Member Functions

Celartem::DjVu::ImageRenderer Class Reference

#include <djv_renderer.h>

Inheritance diagram for Celartem::DjVu::ImageRenderer:
Inheritance graph
[legend]

List of all members.

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, bool inUseFastRescaling) const

Protected Member Functions

virtual const void * lockSource (ssize_t &outSrcRowStride, const Rect &inSrcRect, Photometric inPhotometric) const =0
virtual void unlockSource () const =0

Detailed Description

ImageRenderer class provides a partial stock implementation for foreground/background image renderer.
All you have to do is to implement lockSource and unlockSource functions.


Member Function Documentation

virtual const void* Celartem::DjVu::ImageRenderer::lockSource ( ssize_t &  outSrcRowStride,
const Rect inSrcRect,
Photometric  inPhotometric 
) const [protected, pure virtual]

Lock a portion of the source image.

Parameters:
outSrcRowStride On return, it preserves row-stride of the locked image.
inSrcRect Portion of the source image to render.
inPhotometric Photometric of the output.
Returns:
Pointer to the locked portion of the image.
virtual void Celartem::DjVu::ImageRenderer::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,
bool  inUseFastRescaling 
) const [inline, virtual]

Renders a portion of the mask.

Parameters:
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 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 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.
inUseFastRescaling Determine whether to use fast rescaling algorithm or not.
The default is not to use fast rescaling algorithm.

Implements Celartem::DjVu::Renderer.

virtual void Celartem::DjVu::ImageRenderer::unlockSource (  )  const [protected, pure virtual]

Unlock the previously locked portion of the source image.


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

This document is made with doxygen 1.7.1 at Sun Sep 5 2010 13:03:41.
Caminova Logo