1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.4.9 API Reference</title>
7 <style type="text/css">
8 body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
10 background: #FFFFFF; }
12 p { text-align: justify; }
13 h1 { text-align: center; }
14 li { text-align: justify; }
15 td { padding: 0 0.5em 0 0.5em; }
16 td.left { padding: 0 0.5em 0 0.5em;
19 a:link { color: #0000EF; }
20 a:visited { color: #51188E; }
21 a:hover { color: #FF0000; }
23 span.keyword { font-family: monospace;
28 pre.colored { color: blue; }
30 ul.empty { list-style-type: none; }
35 <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
36 <td width="100%"></td>
37 <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
38 <center><h1>FreeType-2.4.9 API Reference</h1></center>
44 <table align=center cellspacing=5 cellpadding=0 border=0>
45 <tr><td></td><td><a href="#FT_Bitmap_New">FT_Bitmap_New</a></td><td></td><td><a href="#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td></td><td><a href="#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td></tr>
46 <tr><td></td><td><a href="#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td></td><td><a href="#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td></td><td><a href="#FT_Bitmap_Done">FT_Bitmap_Done</a></td></tr>
49 <table align=center width="87%"><tr><td>
50 <p>This section contains functions for converting FT_Bitmap objects.</p>
51 </td></tr></table><br>
52 <table align=center width="75%"><tr><td>
53 <h4><a name="FT_Bitmap_New">FT_Bitmap_New</a></h4>
54 <table align=center width="87%"><tr><td>
55 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
56 </td></tr></table><br>
57 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
59 FT_EXPORT( <span class="keyword">void</span> )
60 <b>FT_Bitmap_New</b>( <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
63 <table align=center width="87%"><tr><td>
64 <p>Initialize a pointer to an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure.</p>
65 </td></tr></table><br>
66 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
68 <table cellpadding=3 border=0>
69 <tr valign=top><td><b>abitmap</b></td><td>
70 <p>A pointer to the bitmap structure.</p>
76 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
77 <td width="100%"></td>
78 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
80 <table align=center width="75%"><tr><td>
81 <h4><a name="FT_Bitmap_Copy">FT_Bitmap_Copy</a></h4>
82 <table align=center width="87%"><tr><td>
83 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
84 </td></tr></table><br>
85 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
87 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
88 <b>FT_Bitmap_Copy</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
89 <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *source,
90 <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target);
93 <table align=center width="87%"><tr><td>
94 <p>Copy a bitmap into another one.</p>
95 </td></tr></table><br>
96 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
98 <table cellpadding=3 border=0>
99 <tr valign=top><td><b>library</b></td><td>
100 <p>A handle to a library object.</p>
102 <tr valign=top><td><b>source</b></td><td>
103 <p>A handle to the source bitmap.</p>
107 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
109 <table cellpadding=3 border=0>
110 <tr valign=top><td><b>target</b></td><td>
111 <p>A handle to the target bitmap.</p>
115 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
116 <p>FreeType error code. 0 means success.</p>
120 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
121 <td width="100%"></td>
122 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
124 <table align=center width="75%"><tr><td>
125 <h4><a name="FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></h4>
126 <table align=center width="87%"><tr><td>
127 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
128 </td></tr></table><br>
129 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
131 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
132 <b>FT_Bitmap_Embolden</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
133 <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>* bitmap,
134 <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xStrength,
135 <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> yStrength );
138 <table align=center width="87%"><tr><td>
139 <p>Embolden a bitmap. The new bitmap will be about ‘xStrength’ pixels wider and ‘yStrength’ pixels higher. The left and bottom borders are kept unchanged.</p>
140 </td></tr></table><br>
141 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
143 <table cellpadding=3 border=0>
144 <tr valign=top><td><b>library</b></td><td>
145 <p>A handle to a library object.</p>
147 <tr valign=top><td><b>xStrength</b></td><td>
148 <p>How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.</p>
150 <tr valign=top><td><b>yStrength</b></td><td>
151 <p>How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.</p>
155 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
157 <table cellpadding=3 border=0>
158 <tr valign=top><td><b>bitmap</b></td><td>
159 <p>A handle to the target bitmap.</p>
163 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
164 <p>FreeType error code. 0 means success.</p>
166 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
167 <p>The current implementation restricts ‘xStrength’ to be less than or equal to 8 if bitmap is of pixel_mode <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>.</p>
168 <p>If you want to embolden the bitmap owned by a <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, you should call <a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a> on the slot first.</p>
172 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
173 <td width="100%"></td>
174 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
176 <table align=center width="75%"><tr><td>
177 <h4><a name="FT_Bitmap_Convert">FT_Bitmap_Convert</a></h4>
178 <table align=center width="87%"><tr><td>
179 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
180 </td></tr></table><br>
181 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
183 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
184 <b>FT_Bitmap_Convert</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
185 <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *source,
186 <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target,
187 <a href="ft2-basic_types.html#FT_Int">FT_Int</a> alignment );
190 <table align=center width="87%"><tr><td>
191 <p>Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a bitmap object with depth 8bpp, making the number of used bytes per line (a.k.a. the ‘pitch’) a multiple of ‘alignment’.</p>
192 </td></tr></table><br>
193 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
195 <table cellpadding=3 border=0>
196 <tr valign=top><td><b>library</b></td><td>
197 <p>A handle to a library object.</p>
199 <tr valign=top><td><b>source</b></td><td>
200 <p>The source bitmap.</p>
202 <tr valign=top><td><b>alignment</b></td><td>
203 <p>The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.</p>
207 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
209 <table cellpadding=3 border=0>
210 <tr valign=top><td><b>target</b></td><td>
211 <p>The target bitmap.</p>
215 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
216 <p>FreeType error code. 0 means success.</p>
218 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
219 <p>It is possible to call <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> multiple times without calling <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> (the memory is simply reallocated).</p>
220 <p>Use <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> to finally remove the bitmap object.</p>
221 <p>The ‘library’ argument is taken to have access to FreeType's memory handling functions.</p>
225 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
226 <td width="100%"></td>
227 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
229 <table align=center width="75%"><tr><td>
230 <h4><a name="FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></h4>
231 <table align=center width="87%"><tr><td>
232 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
233 </td></tr></table><br>
234 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
236 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
237 <b>FT_GlyphSlot_Own_Bitmap</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> slot );
240 <table align=center width="87%"><tr><td>
241 <p>Make sure that a glyph slot owns ‘slot->bitmap’.</p>
242 </td></tr></table><br>
243 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
245 <table cellpadding=3 border=0>
246 <tr valign=top><td><b>slot</b></td><td>
247 <p>The glyph slot.</p>
251 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
252 <p>FreeType error code. 0 means success.</p>
254 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
255 <p>This function is to be used in combination with <a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a>.</p>
259 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
260 <td width="100%"></td>
261 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
263 <table align=center width="75%"><tr><td>
264 <h4><a name="FT_Bitmap_Done">FT_Bitmap_Done</a></h4>
265 <table align=center width="87%"><tr><td>
266 Defined in FT_BITMAP_H (freetype/ftbitmap.h).
267 </td></tr></table><br>
268 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
270 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
271 <b>FT_Bitmap_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
272 <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *bitmap );
275 <table align=center width="87%"><tr><td>
276 <p>Destroy a bitmap object created with <a href="ft2-bitmap_handling.html#FT_Bitmap_New">FT_Bitmap_New</a>.</p>
277 </td></tr></table><br>
278 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
280 <table cellpadding=3 border=0>
281 <tr valign=top><td><b>library</b></td><td>
282 <p>A handle to a library object.</p>
284 <tr valign=top><td><b>bitmap</b></td><td>
285 <p>The bitmap object to be freed.</p>
289 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
290 <p>FreeType error code. 0 means success.</p>
292 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
293 <p>The ‘library’ argument is taken to have access to FreeType's memory handling functions.</p>
297 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
298 <td width="100%"></td>
299 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>