OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftbitmap.h */ | 3 /* ftbitmap.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType utility functions for bitmaps (specification). */ | 5 /* FreeType utility functions for bitmaps (specification). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2004-2006, 2008, 2013 by */ | 7 /* Copyright 2004-2006, 2008, 2013, 2014 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
18 | 18 |
19 #ifndef __FTBITMAP_H__ | 19 #ifndef __FTBITMAP_H__ |
20 #define __FTBITMAP_H__ | 20 #define __FTBITMAP_H__ |
21 | 21 |
22 | 22 |
23 #include "../ft2build.h" | 23 #include <ft2build.h> |
24 #include "freetype.h" | 24 #include FT_FREETYPE_H |
25 | 25 |
26 #ifdef FREETYPE_H | 26 #ifdef FREETYPE_H |
27 #error "freetype.h of FreeType 1 has been loaded!" | 27 #error "freetype.h of FreeType 1 has been loaded!" |
28 #error "Please fix the directory search order for header files" | 28 #error "Please fix the directory search order for header files" |
29 #error "so that freetype.h of FreeType 2 is found first." | 29 #error "so that freetype.h of FreeType 2 is found first." |
30 #endif | 30 #endif |
31 | 31 |
32 | 32 |
33 FT_BEGIN_HEADER | 33 FT_BEGIN_HEADER |
34 | 34 |
35 | 35 |
36 /*************************************************************************/ | 36 /*************************************************************************/ |
37 /* */ | 37 /* */ |
38 /* <Section> */ | 38 /* <Section> */ |
39 /* bitmap_handling */ | 39 /* bitmap_handling */ |
40 /* */ | 40 /* */ |
41 /* <Title> */ | 41 /* <Title> */ |
42 /* Bitmap Handling */ | 42 /* Bitmap Handling */ |
43 /* */ | 43 /* */ |
44 /* <Abstract> */ | 44 /* <Abstract> */ |
45 /* Handling FT_Bitmap objects. */ | 45 /* Handling FT_Bitmap objects. */ |
46 /* */ | 46 /* */ |
47 /* <Description> */ | 47 /* <Description> */ |
48 /* This section contains functions for converting FT_Bitmap objects. */ | 48 /* This section contains functions for handling @FT_Bitmap objects. */ |
| 49 /* Note that none of the functions changes the bitmap's `flow' (as */ |
| 50 /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */ |
49 /* */ | 51 /* */ |
50 /*************************************************************************/ | 52 /*************************************************************************/ |
51 | 53 |
52 | 54 |
53 /*************************************************************************/ | 55 /*************************************************************************/ |
54 /* */ | 56 /* */ |
55 /* <Function> */ | 57 /* <Function> */ |
56 /* FT_Bitmap_New */ | 58 /* FT_Bitmap_New */ |
57 /* */ | 59 /* */ |
58 /* <Description> */ | 60 /* <Description> */ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 /* <Return> */ | 117 /* <Return> */ |
116 /* FreeType error code. 0~means success. */ | 118 /* FreeType error code. 0~means success. */ |
117 /* */ | 119 /* */ |
118 /* <Note> */ | 120 /* <Note> */ |
119 /* The current implementation restricts `xStrength' to be less than */ | 121 /* The current implementation restricts `xStrength' to be less than */ |
120 /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ | 122 /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ |
121 /* */ | 123 /* */ |
122 /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ | 124 /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ |
123 /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ | 125 /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ |
124 /* */ | 126 /* */ |
| 127 /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */ |
| 128 /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */ |
| 129 /* */ |
125 FT_EXPORT( FT_Error ) | 130 FT_EXPORT( FT_Error ) |
126 FT_Bitmap_Embolden( FT_Library library, | 131 FT_Bitmap_Embolden( FT_Library library, |
127 FT_Bitmap* bitmap, | 132 FT_Bitmap* bitmap, |
128 FT_Pos xStrength, | 133 FT_Pos xStrength, |
129 FT_Pos yStrength ); | 134 FT_Pos yStrength ); |
130 | 135 |
131 | 136 |
132 /*************************************************************************/ | 137 /*************************************************************************/ |
133 /* */ | 138 /* */ |
134 /* <Function> */ | 139 /* <Function> */ |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 223 |
219 /* */ | 224 /* */ |
220 | 225 |
221 | 226 |
222 FT_END_HEADER | 227 FT_END_HEADER |
223 | 228 |
224 #endif /* __FTBITMAP_H__ */ | 229 #endif /* __FTBITMAP_H__ */ |
225 | 230 |
226 | 231 |
227 /* END */ | 232 /* END */ |
OLD | NEW |