1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/****************************************************************************/
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
/* Copyright 1996-2000 by */
/* D. Turner, R.Wilhelm, and W. Lemberg */
/* */
/* display.h: Display component interface used by test programs */
/* */
/* This file is used to display glyphs and strings in a target window */
/* using the graphics drivers provided by gmain.c, gevents.h, etc. */
/* */
/* Its role is to be shared and heavely commented to let people understand */
/* how we do the job... */
/* */
/* See comments in display.c for a full description! */
/* */
/****************************************************************************/
#ifndef DISPLAY_H
#define DISPLAY_H
#include "freetype.h" /* TT_Raster_Map */
/* The target bitmap or pixmap -- covering the full display window/screen */
extern TT_Raster_Map Bit;
/* A smaller intermediate bitmap used to render individual glyphs when */
/* font smoothing mode is activated. It is then or-ed to `Bit'. */
extern TT_Raster_Map Small_Bit;
/* the virtual palette */
extern unsigned char virtual_palette[5];
/* Or-ing the possible palette values gets us from 0 to 7 */
/* We must bound check these... */
extern unsigned char bounded_palette[8];
/* Clears the Bit bitmap/pixmap */
void Clear_Display( void );
/* Clears the Small_Bit pixmap */
void Clear_Small( void );
/* Initialize the display bitmap named Bit */
int Init_Display( int font_smoothing );
/* Initialize Small Bitmap */
int Init_Small( int x_ppem, int y_ppem );
/* Convert the display pixmap from virtual to display palette */
void Convert_To_Display_Palette( void );
/* Render a single glyph into the display bit/pixmap. */
/* */
/* Note that in b/w mode, we simply render the glyph directly into */
/* the display map, as the scan-line converter or-es the glyph into */
/* the target bitmap. */
/* */
/* In gray mode, however, the glyph is first rendered individually in */
/* the Small_Bit map, then 'or-ed' with bounding into the display */
/* pixmap. */
/* */
TT_Error Render_Single_Glyph( int font_smoothing,
TT_Glyph glyph,
int x_offset,
int y_offset );
#endif /* DISPLAY_H */
/* End */
|