Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bitmap.h File Reference
#include "sysdeps.h"
#include <stdio.h>
+ Include dependency graph for bitmap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BITMAP
 

Macros

#define BITMAP_BYTES   4
 
#define BITMAP_BITS   (BITMAP_BYTES << 3)
 
#define BM_BYTES_PER_LINE(b)   (ROUND((b)->width, BITMAP_BITS) * BITMAP_BYTES)
 
#define BM_WIDTH(b)   (((BITMAP *)(b))->width)
 
#define BM_HEIGHT(b)   (((BITMAP *)(b))->height)
 
#define BMBIT(n)   ((BmUnit)1 << (n))
 
#define bm_offset(b, o)   (BmUnit *)((Uchar *)(b) + (o))
 
#define __bm_unit_ptr(b, x, y)
 
#define __bm_unit(b, x, y)   __bm_unit_ptr((b), (x), (y))[0]
 
#define BM_GETPIXEL(b, x, y)   __bm_unit((b), (x), (y))
 
#define BM_SETPIXEL(b, x, y)   (__bm_unit((b), (x), (y)) |= FIRSTMASKAT(x))
 
#define BM_CLRPIXEL(b, x, y)   (__bm_unit((b), (x), (y)) &= ~FIRSTMASKAT(x))
 
#define FIRSTSHIFT   0
 
#define LASTSHIFT   (BITMAP_BITS - 1)
 
#define NEXTMASK(m)   ((m) <<= 1)
 
#define PREVMASK(m)   ((m) >>= 1)
 
#define FIRSTSHIFTAT(c)   ((c) % BITMAP_BITS)
 
#define FIRSTMASK   BMBIT(FIRSTSHIFT)
 
#define FIRSTMASKAT(c)   BMBIT(FIRSTSHIFTAT(c))
 
#define LASTMASK   BMBIT(LASTSHIFT)
 

Typedefs

typedef Uint32 BmUnit
 

Functions

BITMAP *bitmap_alloc __PROTO ((int, int))
 
void bitmap_destroy __PROTO ((BITMAP *))
 
void bitmap_set_col __PROTO ((BITMAP *, int, int, int, int))
 
void bitmap_paint_bits __PROTO ((BmUnit *, int, int))
 
BITMAP *bitmap_convert_lsb8 __PROTO ((Uchar *, int, int, int))
 
void bitmap_print __PROTO ((FILE *, BITMAP *))
 

Macro Definition Documentation

#define __bm_unit (   b,
  x,
 
)    __bm_unit_ptr((b), (x), (y))[0]

Definition at line 58 of file bitmap.h.

#define __bm_unit_ptr (   b,
  x,
 
)
Value:
bm_offset((b)->data, (y) * (b)->stride + \

Definition at line 54 of file bitmap.h.

#define BITMAP_BITS   (BITMAP_BYTES << 3)

Definition at line 32 of file bitmap.h.

#define BITMAP_BYTES   4

Definition at line 29 of file bitmap.h.

#define BM_BYTES_PER_LINE (   b)    (ROUND((b)->width, BITMAP_BITS) * BITMAP_BYTES)

Definition at line 41 of file bitmap.h.

#define BM_CLRPIXEL (   b,
  x,
 
)    (__bm_unit((b), (x), (y)) &= ~FIRSTMASKAT(x))

Definition at line 62 of file bitmap.h.

#define BM_GETPIXEL (   b,
  x,
 
)    __bm_unit((b), (x), (y))

Definition at line 60 of file bitmap.h.

#define BM_HEIGHT (   b)    (((BITMAP *)(b))->height)

Definition at line 44 of file bitmap.h.

#define bm_offset (   b,
 
)    (BmUnit *)((Uchar *)(b) + (o))

Definition at line 52 of file bitmap.h.

#define BM_SETPIXEL (   b,
  x,
 
)    (__bm_unit((b), (x), (y)) |= FIRSTMASKAT(x))

Definition at line 61 of file bitmap.h.

#define BM_WIDTH (   b)    (((BITMAP *)(b))->width)

Definition at line 43 of file bitmap.h.

#define BMBIT (   n)    ((BmUnit)1 << (n))

Definition at line 46 of file bitmap.h.

#define FIRSTMASK   BMBIT(FIRSTSHIFT)

Definition at line 111 of file bitmap.h.

#define FIRSTMASKAT (   c)    BMBIT(FIRSTSHIFTAT(c))

Definition at line 112 of file bitmap.h.

#define FIRSTSHIFT   0

Definition at line 104 of file bitmap.h.

#define FIRSTSHIFTAT (   c)    ((c) % BITMAP_BITS)

Definition at line 108 of file bitmap.h.

#define LASTMASK   BMBIT(LASTSHIFT)

Definition at line 113 of file bitmap.h.

#define LASTSHIFT   (BITMAP_BITS - 1)

Definition at line 105 of file bitmap.h.

#define NEXTMASK (   m)    ((m) <<= 1)

Definition at line 106 of file bitmap.h.

#define PREVMASK (   m)    ((m) >>= 1)

Definition at line 107 of file bitmap.h.

Typedef Documentation

typedef Uint32 BmUnit

Definition at line 26 of file bitmap.h.

Function Documentation

BITMAP* bitmap_alloc __PROTO ( (int, int)  )
void bitmap_destroy __PROTO ( (BITMAP *)  )
void bitmap_set_col __PROTO ( (BITMAP *, int, int, int, int)  )
void bitmap_paint_bits __PROTO ( (BmUnit *, int, int)  )
BITMAP* bitmap_convert_lsb8 __PROTO ( (Uchar *, int, int, int)  )
void bitmap_print __PROTO ( (FILE *, BITMAP *)  )