#include <djv_renderer.h>

Public Member Functions | |
| 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, bool inUseFastRescaling=false) const =0 |
| virtual String | getChunkId () const =0 |
| virtual Referable * | getInternalRenderer () const =0 |
| virtual | ~Renderer () |
Static Public Member Functions | |
| static AutoPtr< Renderer > | create (const Chunk *inChunk, const Dictionary *inDictionary) |
Renderer class provides the general interface to render images.
| virtual Celartem::DjVu::Renderer::~Renderer | ( | ) | [inline, virtual] |
Destructor.
| 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.
| inChunk | The chunk which contains data. |
true if the chunk is correctly consumed; otherwise false. | static AutoPtr<Renderer> Celartem::DjVu::Renderer::create | ( | const Chunk * | inChunk, | |
| const Dictionary * | inDictionary | |||
| ) | [static] |
Creates a Renderer instance from the specified chunk.
| inChunk | A chunk which contains the first data of image. param inDictionary A Dictionary instance corresponding to the chunk if exists. |
| virtual size_t Celartem::DjVu::Renderer::getBitsPerComponent | ( | ) | const [pure virtual] |
Get bits-per-component on the original image file.
| virtual String Celartem::DjVu::Renderer::getChunkId | ( | ) | const [pure virtual] |
Gets the identifier of the chunk which was used to instanciate this instance.
| virtual size_t Celartem::DjVu::Renderer::getDpi | ( | ) | const [pure virtual] |
Get dot-per-inch on the original image file.
| virtual size_t Celartem::DjVu::Renderer::getHeight | ( | ) | const [pure virtual] |
Gets the original height of the image in pixels.
| virtual Referable* Celartem::DjVu::Renderer::getInternalRenderer | ( | ) | const [pure virtual] |
Obtains the internal renderer instance.
| virtual Photometric Celartem::DjVu::Renderer::getPhotometric | ( | ) | const [pure virtual] |
Get photometric-interpretation of the original image file.
| virtual size_t Celartem::DjVu::Renderer::getWidth | ( | ) | const [pure virtual] |
Gets the original width of the image in pixels.
| 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, |
|||
| bool | inUseFastRescaling = false | |||
| ) | const [pure virtual] |
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 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. |
Implemented in Celartem::DjVu::ImageRenderer.