Public Member Functions | Protected Member Functions | List of all members
Celartem::DjVu::ImageRenderer Class Referenceabstract

#include <djv_renderer.h>

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

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 ReferablegetInternalRenderer () 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< Renderercreate (const Chunk *inChunk, const Dictionary *inDictionary)
 
- Static Public Member Functions inherited from Celartem::Referable
static void dumpDbgAllRefCount ()
 

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
protectedpure virtual

Lock a portion of the source image.

Parameters
outSrcRowStrideOn return, it preserves row-stride of the locked image.
inSrcRectPortion of the source image to render.
inPhotometricPhotometric 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,
size_t  inForeX,
size_t  inForeY,
bool  inUseFastRescaling 
) const
inlinevirtual

Renders a portion of the mask.

Parameters
ioImagePtrPointer 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.
inRowStrideThe row-stride of the image.
inPmThe photometric of the image.
inRectRectangle to draw in the rescaled image coordination.
inRescaledWidthThe 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.
inRescaledHeightThe 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.
inForegroundOptional 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.
inForeRowStrideThe 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.
inForeWidthThe 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.
inForeHeightThe 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.
inForeXThe left position, where the foreground rendering starts. The mask pixel X corresponds to the foreground pixel (X + inForeX) * inForeWidth / inRescaledWidth.
inForeYThe top position, where the foreground rendering starts. The mask pixel Y corresponds to the foreground pixel (Y + inForeY) * inForeHeight / inRescaledHeight.
inUseFastRescalingDetermine 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
protectedpure virtual

Unlock the previously locked portion of the source image.


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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo