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

bitmap.c File Reference


Detailed Description

Bitmap blitting.

Version:
$Id: bitmap.c 248 2004-01-14 10:34:20Z sam $
Author:
Sam Hocevar <sam@zoy.org> This file contains bitmap blitting functions.

Definition in file bitmap.c.

#include "config.h"
#include <stdlib.h>
#include "caca.h"
#include "caca_internals.h"

Go to the source code of this file.

Classes

struct  caca_bitmap

Defines

#define DENSITY_CHARS   ((sizeof(density_chars)/sizeof(char const)/4)-1)
#define HSV_DISTANCE(h, s, v, index)
#define HSV_HRATIO   3
#define HSV_XRATIO   6
#define HSV_YRATIO   3
#define LOOKUP_HUE   16
#define LOOKUP_SAT   32
#define LOOKUP_VAL   32

Typedefs

typedef unsigned short uint16_t
typedef unsigned int uint32_t
typedef unsigned char uint8_t

Functions

int _caca_end_bitmap (void)
int _caca_init_bitmap (void)
struct caca_bitmap * caca_create_bitmap (unsigned int bpp, unsigned int w, unsigned int h, unsigned int pitch, unsigned int rmask, unsigned int gmask, unsigned int bmask, unsigned int amask)
 Create an internal bitmap object.
void caca_draw_bitmap (int x1, int y1, int x2, int y2, struct caca_bitmap const *bitmap, void *pixels)
 Draw a bitmap on the screen.
void caca_free_bitmap (struct caca_bitmap *bitmap)
 Free the memory associated with a bitmap.
void caca_set_bitmap_palette (struct caca_bitmap *bitmap, unsigned int red[], unsigned int green[], unsigned int blue[], unsigned int alpha[])
 Set the palette of an 8bpp bitmap object.
static unsigned int get_no_dither (void)
static unsigned int get_ordered2_dither (void)
static unsigned int get_ordered4_dither (void)
static unsigned int get_ordered8_dither (void)
static unsigned int get_random_dither (void)
static void get_rgba_default (struct caca_bitmap const *, uint8_t *, int, int, unsigned int *, unsigned int *, unsigned int *, unsigned int *)
static void increment_no_dither (void)
static void increment_ordered2_dither (void)
static void increment_ordered4_dither (void)
static void increment_ordered8_dither (void)
static void increment_random_dither (void)
static void init_no_dither (int)
static void init_ordered2_dither (int)
static void init_ordered4_dither (int)
static void init_ordered8_dither (int)
static void init_random_dither (int)
static void mask2shift (unsigned int, int *, int *)
static void rgb2hsv_default (int, int, int, int *, int *, int *)

Variables

enum caca_feature _caca_antialiasing
enum caca_feature _caca_background
enum caca_feature _caca_dithering
static unsigned char hsv_distances [LOOKUP_VAL][LOOKUP_SAT][LOOKUP_HUE]
static int const hsv_palette []
static enum caca_color lookup_colors [8]
static unsigned int ordered2_index
static unsigned int * ordered2_table
static unsigned int ordered4_index
static unsigned int * ordered4_table
static unsigned int ordered8_index
static unsigned int * ordered8_table


Generated by  Doxygen 1.6.0   Back to index