#include <djv_renderer.h>
|
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 void | render (u8 *ioImagePtr, ssize_t inRowStride, Photometric inPm, const Rect &inRect, size_t inRescaledWidth, size_t inRescaledHeight, const u8 *inForeground=NULL, ssize_t inForeRowStride=0, size_t inForeWidth=0, size_t inForeHeight=0, size_t inForeX=0, size_t inForeY=0, bool inUseFastRescaling=false) const =0 |
|
virtual String | getChunkId () const =0 |
|
virtual Referable * | getInternalRenderer () const =0 |
|
virtual | ~Renderer () |
|
| Referable () |
|
void | addRef () const |
|
void | releaseRef () const |
|
size_t | getReferenceCount () const |
|
Renderer class provides the general interface to render images.
virtual Celartem::DjVu::Renderer::~Renderer |
( |
| ) |
|
|
inlinevirtual |
virtual bool Celartem::DjVu::Renderer::addChunk |
( |
const Chunk * |
inChunk | ) |
|
|
pure virtual |
Adds the chunk as its data.
This method firstly examines the chunk content by both its chunk Id and the actual content and if the chunk is acceptable, consumes the content and updates the internal state; otherwise if the content is not acceptable, that is, the content is not for the render or some invalid data, this method do nothing but returns immediately.
- Parameters
-
inChunk | The chunk which contains data. |
- Returns
true
if the chunk is correctly consumed; otherwise false
.
Creates a Renderer instance from the specified chunk.
- Parameters
-
inChunk | A chunk which contains the first data of image. param inDictionary A Dictionary instance corresponding to the chunk if exists. |
- Returns
- A pointer to the newly created Renderer instance.
virtual size_t Celartem::DjVu::Renderer::getBitsPerComponent |
( |
| ) |
const |
|
pure virtual |
Get bits-per-component on the original image file.
- Returns
- The bits-per-component. If the original image is not homogeneous bits-per-component configuration, this method returns 0.
virtual String Celartem::DjVu::Renderer::getChunkId |
( |
| ) |
const |
|
pure virtual |
Gets the identifier of the chunk which was used to instanciate this instance.
- Returns
- The identifier of the chunk passed to create method.
virtual size_t Celartem::DjVu::Renderer::getDpi |
( |
| ) |
const |
|
pure virtual |
Get dot-per-inch on the original image file.
- Returns
- If the image source cannot obtain the resolution, this method should return 96.
virtual size_t Celartem::DjVu::Renderer::getHeight |
( |
| ) |
const |
|
pure virtual |
virtual Referable* Celartem::DjVu::Renderer::getInternalRenderer |
( |
| ) |
const |
|
pure virtual |
Obtains the internal renderer instance.
- Returns
- Pointer to the internal renderer. You can use dynamic_cast against the pointer to obtain the actual instance.
virtual Photometric Celartem::DjVu::Renderer::getPhotometric |
( |
| ) |
const |
|
pure virtual |
Get photometric-interpretation of the original image file.
- Returns
- The photometric-interpretation of the original image.
virtual size_t Celartem::DjVu::Renderer::getWidth |
( |
| ) |
const |
|
pure virtual |
virtual void Celartem::DjVu::Renderer::render |
( |
u8 * |
ioImagePtr, |
|
|
ssize_t |
inRowStride, |
|
|
Photometric |
inPm, |
|
|
const Rect & |
inRect, |
|
|
size_t |
inRescaledWidth, |
|
|
size_t |
inRescaledHeight, |
|
|
const u8 * |
inForeground = NULL , |
|
|
ssize_t |
inForeRowStride = 0 , |
|
|
size_t |
inForeWidth = 0 , |
|
|
size_t |
inForeHeight = 0 , |
|
|
size_t |
inForeX = 0 , |
|
|
size_t |
inForeY = 0 , |
|
|
bool |
inUseFastRescaling = false |
|
) |
| const |
|
pure 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 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. |
Implemented in Celartem::DjVu::ImageRenderer.
The documentation for this class was generated from the following file: