OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftlcdfil.h */ | 3 /* ftlcdfil.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType API for color filtering of subpixel bitmap glyphs */ | 5 /* FreeType API for color filtering of subpixel bitmap glyphs */ |
6 /* (specification). */ | 6 /* (specification). */ |
7 /* */ | 7 /* */ |
8 /* Copyright 2006-2008, 2010, 2013 by */ | 8 /* Copyright 2006-2015 by */ |
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
10 /* */ | 10 /* */ |
11 /* This file is part of the FreeType project, and may only be used, */ | 11 /* This file is part of the FreeType project, and may only be used, */ |
12 /* modified, and distributed under the terms of the FreeType project */ | 12 /* modified, and distributed under the terms of the FreeType project */ |
13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
14 /* this file you indicate that you have read the license and */ | 14 /* this file you indicate that you have read the license and */ |
15 /* understand and accept it fully. */ | 15 /* understand and accept it fully. */ |
16 /* */ | 16 /* */ |
17 /***************************************************************************/ | 17 /***************************************************************************/ |
18 | 18 |
(...skipping 30 matching lines...) Expand all Loading... |
49 * through @FT_Render_Glyph. This is useful to reduce color fringes | 49 * through @FT_Render_Glyph. This is useful to reduce color fringes |
50 * that would occur with unfiltered rendering. | 50 * that would occur with unfiltered rendering. |
51 * | 51 * |
52 * Note that no filter is active by default, and that this function is | 52 * Note that no filter is active by default, and that this function is |
53 * *not* implemented in default builds of the library. You need to | 53 * *not* implemented in default builds of the library. You need to |
54 * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file | 54 * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file |
55 * in order to activate it. | 55 * in order to activate it. |
56 * | 56 * |
57 * FreeType generates alpha coverage maps, which are linear by nature. | 57 * FreeType generates alpha coverage maps, which are linear by nature. |
58 * For instance, the value 0x80 in bitmap representation means that | 58 * For instance, the value 0x80 in bitmap representation means that |
59 * (within numerical precision) 0x80/0xff fraction of that pixel is | 59 * (within numerical precision) 0x80/0xFF fraction of that pixel is |
60 * covered by the glyph's outline. The blending function for placing | 60 * covered by the glyph's outline. The blending function for placing |
61 * text over a background is | 61 * text over a background is |
62 * | 62 * |
63 * { | 63 * { |
64 * dst = alpha * src + (1 - alpha) * dst , | 64 * dst = alpha * src + (1 - alpha) * dst , |
65 * } | 65 * } |
66 * | 66 * |
67 * which is known as OVER. However, when calculating the output of the | 67 * which is known as OVER. However, when calculating the output of the |
68 * OVER operator, the source colors should first be transformed to a | 68 * OVER operator, the source colors should first be transformed to a |
69 * linear color space, then alpha blended in that space, and transformed | 69 * linear color space, then alpha blended in that space, and transformed |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 /* */ | 243 /* */ |
244 | 244 |
245 | 245 |
246 FT_END_HEADER | 246 FT_END_HEADER |
247 | 247 |
248 #endif /* __FT_LCD_FILTER_H__ */ | 248 #endif /* __FT_LCD_FILTER_H__ */ |
249 | 249 |
250 | 250 |
251 /* END */ | 251 /* END */ |
OLD | NEW |