Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

Public Member Functions | Protected Member Functions | Protected Attributes | Friends

GPixmap Class Reference

#include <GPixmap.h>

Inheritance diagram for GPixmap:
Inheritance graph
Collaboration diagram for GPixmap:
Collaboration graph

List of all members.

Public Member Functions

void destroy (void)
int get_count (void) const
int get_grays (void) const
void set_grays (int)
virtual ~GPixmap ()
 Virtual destructor.
void init (int nrows, int ncolumns, const GPixel *filler=0)
void init (const GPixmap &ref)
void init (const GPixmap &ref, const GRect &rect)
void init (const GBitmap &ref, const GPixel *ramp=0)
void init (const GBitmap &ref, const GRect &rect, const GPixel *ramp=0)
void init (ByteStream &ref)
GPixmapoperator= (const GBitmap &ref)
GPixmapoperator= (const GPixmap &ref)
Accessing pixels.
unsigned int rows () const
unsigned int columns () const
const GPixeloperator[] (int row) const
GPixeloperator[] (int row)
unsigned int rowsize () const
Resampling images.
void downsample (const GPixmap *src, int factor, const GRect *rect=0)
void upsample (const GPixmap *src, int factor, const GRect *rect=0)
void downsample43 (const GPixmap *src, const GRect *rect=0)
void upsample23 (const GPixmap *src, const GRect *rect=0)
Blitting and applying stencils.

These function is essential for rendering DjVu images. The elementary functions are {attenuate} and {blit}. The combined functions {blend} and {stencil} should be viewed as optimizations.

void attenuate (const GBitmap *bm, int x, int y)
void blit (const GBitmap *bm, int x, int y, const GPixel *color)
void blit (const GBitmap *bm, int x, int y, const GPixmap *color)
void blend (const GBitmap *bm, int x, int y, const GPixmap *color)
void stencil (const GBitmap *bm, const GPixmap *pm, int pms, const GRect *pmr, double corr, GPixel white)
void stencil (const GBitmap *bm, const GPixmap *pm, int pms, const GRect *pmr, double corr=1.0)
unsigned int get_memory_usage () const
void save_ppm (ByteStream &bs, int raw=1) const
Stealing or borrowing the memory buffer (advanced).
GPixeltake_data (size_t &offset)
void borrow_data (GPixel &data, int w, int h)
void donate_data (GPixel *data, int w, int h)
 Identical to the above, but GPixmap will do the delete [].
GP< GPixmaprotate (int count=0)

Static Public Member Functions

static GP< GPixmapcreate (void)
static GP< GPixmapcreate (const int nrows, const int ncolumns, const GPixel *filler=0)
static GP< GPixmapcreate (const GBitmap &ref)
static GP< GPixmapcreate (const GBitmap &ref, const GRect &rect)
static GP< GPixmapcreate (const GPixmap &ref)
static GP< GPixmapcreate (const GPixmap &ref, const GRect &rect)
static GP< GPixmapcreate (ByteStream &ref)

Protected Member Functions

 GPixmap (ByteStream &ref)
 GPixmap (const GPixmap &ref, const GRect &rect)
 GPixmap (const GPixmap &ref)
 GPixmap (const GBitmap &ref, const GRect &rect)
 GPixmap (const GBitmap &ref)
 GPixmap (int nrows, int ncolumns, const GPixel *filler=0)

Protected Attributes

volatile int count
 The reference counter.
unsigned short ncolumns
unsigned short nrows
unsigned short nrowsize


class DjVu_PixImage

Manipulating colors.

void ordered_666_dither (int xmin=0, int ymin=0)
void ordered_32k_dither (int xmin=0, int ymin=0)
void color_correct (double corr)
void color_correct (double corr, GPixel white)
static void color_correct (double corr, GPixel *pix, int npix)
static void color_correct (double corr, GPixel white, GPixel *pix, int npix)

Detailed Description

RGB Color images. Instances of class GPixmap# represent color images as a two dimensional array of pixels {GPixel}. The bracket operator returns a pointer to the pixels composing one line of the image. This pointer can be used as an array to read or write the pixels of this particular line. Following the general convention of the DjVu Reference Library, line zero is always the bottom line of the image.

Definition at line 146 of file GPixmap.h.

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

Generated by  Doxygen 1.6.0   Back to index