<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>FTGL: ftgl.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>ftgl.h</h1><a href="ftgl_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * FTGL - OpenGL font library</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz></span> <a name="l00005"></a>00005 <span class="comment"> * Copyright (c) 2008 Sam Hocevar <sam@zoy.org></span> <a name="l00006"></a>00006 <span class="comment"> * Copyright (c) 2008 Sean Morrison <learner@brlcad.org></span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span> <a name="l00009"></a>00009 <span class="comment"> * a copy of this software and associated documentation files (the</span> <a name="l00010"></a>00010 <span class="comment"> * "Software"), to deal in the Software without restriction, including</span> <a name="l00011"></a>00011 <span class="comment"> * without limitation the rights to use, copy, modify, merge, publish,</span> <a name="l00012"></a>00012 <span class="comment"> * distribute, sublicense, and/or sell copies of the Software, and to</span> <a name="l00013"></a>00013 <span class="comment"> * permit persons to whom the Software is furnished to do so, subject to</span> <a name="l00014"></a>00014 <span class="comment"> * the following conditions:</span> <a name="l00015"></a>00015 <span class="comment"> *</span> <a name="l00016"></a>00016 <span class="comment"> * The above copyright notice and this permission notice shall be</span> <a name="l00017"></a>00017 <span class="comment"> * included in all copies or substantial portions of the Software.</span> <a name="l00018"></a>00018 <span class="comment"> *</span> <a name="l00019"></a>00019 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span> <a name="l00020"></a>00020 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span> <a name="l00021"></a>00021 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</span> <a name="l00022"></a>00022 <span class="comment"> * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY</span> <a name="l00023"></a>00023 <span class="comment"> * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,</span> <a name="l00024"></a>00024 <span class="comment"> * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE</span> <a name="l00025"></a>00025 <span class="comment"> * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span> <a name="l00026"></a>00026 <span class="comment"> */</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#ifndef __ftgl__</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define __ftgl__</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00031"></a>00031 <span class="comment">/* We need the Freetype headers */</span> <a name="l00032"></a>00032 <span class="preprocessor">#include <ft2build.h></span> <a name="l00033"></a>00033 <span class="preprocessor">#include FT_FREETYPE_H</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include FT_GLYPH_H</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include FT_OUTLINE_H</span> <a name="l00036"></a>00036 <span class="preprocessor"></span> <a name="l00037"></a>00037 <span class="comment">/* Floating point types used by the library */</span> <a name="l00038"></a><a class="code" href="ftgl_8h.html#ae792fb2619b3890381a8b68babbdac74">00038</a> <span class="keyword">typedef</span> <span class="keywordtype">double</span> <a class="code" href="ftgl_8h.html#ae792fb2619b3890381a8b68babbdac74">FTGL_DOUBLE</a>; <a name="l00039"></a><a class="code" href="ftgl_8h.html#ad08e479bb6a0dbe611100e8549d55a1b">00039</a> <span class="keyword">typedef</span> <span class="keywordtype">float</span> <a class="code" href="ftgl_8h.html#ad08e479bb6a0dbe611100e8549d55a1b">FTGL_FLOAT</a>; <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="comment">/* Macros used to declare C-linkage types and symbols */</span> <a name="l00042"></a>00042 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00043"></a><a class="code" href="ftgl_8h.html#a1543f6485dcd3ef6db0a10396071a6f6">00043</a> <span class="preprocessor"></span><span class="preprocessor"># define FTGL_BEGIN_C_DECLS extern "C" { namespace FTGL {</span> <a name="l00044"></a><a class="code" href="ftgl_8h.html#aba8b33a81b5c655eb7c4b358419a17d5">00044</a> <span class="preprocessor"></span><span class="preprocessor"># define FTGL_END_C_DECLS } }</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_BEGIN_C_DECLS</span> <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_END_C_DECLS</span> <a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00049"></a>00049 <span class="preprocessor"></span> <a name="l00050"></a>00050 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00051"></a><a class="code" href="namespaceFTGL.html">00051</a> <span class="preprocessor"></span><span class="keyword">namespace </span>FTGL <a name="l00052"></a>00052 { <a name="l00053"></a><a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74e">00053</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a name="l00054"></a>00054 { <a name="l00055"></a><a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea682a1ee1dff8218153646cfbe570bdae">00055</a> <a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea682a1ee1dff8218153646cfbe570bdae">RENDER_FRONT</a> = 0x0001, <a name="l00056"></a><a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea13191d43484e1bfe32598e8cb894cef9">00056</a> <a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea13191d43484e1bfe32598e8cb894cef9">RENDER_BACK</a> = 0x0002, <a name="l00057"></a><a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea5ce274c9f80d8a48fbe026329885cf92">00057</a> <a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea5ce274c9f80d8a48fbe026329885cf92">RENDER_SIDE</a> = 0x0004, <a name="l00058"></a><a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea2966ccc38996af16a67387177a8c6a62">00058</a> <a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74ea2966ccc38996af16a67387177a8c6a62">RENDER_ALL</a> = 0xffff <a name="l00059"></a>00059 } <a class="code" href="namespaceFTGL.html#a9916822cb1247bd2e1aae26f7bfec74e">RenderMode</a>; <a name="l00060"></a>00060 <a name="l00061"></a><a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22">00061</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a name="l00062"></a>00062 { <a name="l00063"></a><a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a6ee95d374a657042c6fc2c31a4e3315f">00063</a> <a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a6ee95d374a657042c6fc2c31a4e3315f">ALIGN_LEFT</a> = 0, <a name="l00064"></a><a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22ac7c6f1f8db0e28240b81aef4b1ac1cd3">00064</a> <a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22ac7c6f1f8db0e28240b81aef4b1ac1cd3">ALIGN_CENTER</a> = 1, <a name="l00065"></a><a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a3dcbd4e83d00b1a0e02ef1262d0f9d65">00065</a> <a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a3dcbd4e83d00b1a0e02ef1262d0f9d65">ALIGN_RIGHT</a> = 2, <a name="l00066"></a><a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a3cde3d9d1620c91e430c47118ef10bb2">00066</a> <a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22a3cde3d9d1620c91e430c47118ef10bb2">ALIGN_JUSTIFY</a> = 3 <a name="l00067"></a>00067 } <a class="code" href="namespaceFTGL.html#a646f2ba64dbd9fb3da4d17ae93a5dd22">TextAlignment</a>; <a name="l00068"></a>00068 } <a name="l00069"></a>00069 <span class="preprocessor">#else</span> <a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_RENDER_FRONT 0x0001</span> <a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_RENDER_BACK 0x0002</span> <a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_RENDER_SIDE 0x0004</span> <a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_RENDER_ALL 0xffff</span> <a name="l00074"></a>00074 <span class="preprocessor"></span> <a name="l00075"></a>00075 <span class="preprocessor"># define FTGL_ALIGN_LEFT 0</span> <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_ALIGN_CENTER 1</span> <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_ALIGN_RIGHT 2</span> <a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor"># define FTGL_ALIGN_JUSTIFY 3</span> <a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00080"></a>00080 <span class="preprocessor"></span> <a name="l00081"></a>00081 <span class="comment">// Compiler-specific conditional compilation</span> <a name="l00082"></a>00082 <span class="preprocessor">#ifdef _MSC_VER // MS Visual C++</span> <a name="l00083"></a>00083 <span class="preprocessor"></span> <a name="l00084"></a>00084 <span class="comment">// Disable various warning.</span> <a name="l00085"></a>00085 <span class="comment">// 4786: template name too long</span> <a name="l00086"></a>00086 <span class="preprocessor"> #pragma warning(disable : 4251)</span> <a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor"> #pragma warning(disable : 4275)</span> <a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor"> #pragma warning(disable : 4786)</span> <a name="l00089"></a>00089 <span class="preprocessor"></span> <a name="l00090"></a>00090 <span class="comment">// The following definitions control how symbols are exported.</span> <a name="l00091"></a>00091 <span class="comment">// If the target is a static library ensure that FTGL_LIBRARY_STATIC</span> <a name="l00092"></a>00092 <span class="comment">// is defined. If building a dynamic library (ie DLL) ensure the</span> <a name="l00093"></a>00093 <span class="comment">// FTGL_LIBRARY macro is defined, as it will mark symbols for</span> <a name="l00094"></a>00094 <span class="comment">// export. If compiling a project to _use_ the _dynamic_ library</span> <a name="l00095"></a>00095 <span class="comment">// version of the library, no definition is required.</span> <a name="l00096"></a>00096 <span class="preprocessor"> #ifdef FTGL_LIBRARY_STATIC // static lib - no special export required</span> <a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor"> # define FTGL_EXPORT</span> <a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor"> #elif FTGL_LIBRARY // dynamic lib - must export/import symbols appropriately.</span> <a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor"> # define FTGL_EXPORT __declspec(dllexport)</span> <a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor"> #else</span> <a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor"> # define FTGL_EXPORT __declspec(dllimport)</span> <a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor"> #endif</span> <a name="l00103"></a>00103 <span class="preprocessor"></span> <a name="l00104"></a>00104 <span class="preprocessor">#else</span> <a name="l00105"></a>00105 <span class="preprocessor"></span> <span class="comment">// Compiler that is not MS Visual C++.</span> <a name="l00106"></a>00106 <span class="comment">// Ensure that the export symbol is defined (and blank)</span> <a name="l00107"></a><a class="code" href="ftgl_8h.html#ae472b08d77a4ead09abe74fe37220270">00107</a> <span class="preprocessor"> #define FTGL_EXPORT</span> <a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00109"></a>00109 <span class="preprocessor"></span> <a name="l00110"></a>00110 <span class="preprocessor">#include <<a class="code" href="FTPoint_8h.html">FTGL/FTPoint.h</a>></span> <a name="l00111"></a>00111 <span class="preprocessor">#include <<a class="code" href="FTBBox_8h.html">FTGL/FTBBox.h</a>></span> <a name="l00112"></a>00112 <span class="preprocessor">#include <<a class="code" href="FTBuffer_8h.html">FTGL/FTBuffer.h</a>></span> <a name="l00113"></a>00113 <a name="l00114"></a>00114 <span class="preprocessor">#include <<a class="code" href="FTGlyph_8h.html">FTGL/FTGlyph.h</a>></span> <a name="l00115"></a>00115 <span class="preprocessor">#include <<a class="code" href="FTBitmapGlyph_8h.html">FTGL/FTBitmapGlyph.h</a>></span> <a name="l00116"></a>00116 <span class="preprocessor">#include <<a class="code" href="FTBufferGlyph_8h.html">FTGL/FTBufferGlyph.h</a>></span> <a name="l00117"></a>00117 <span class="preprocessor">#include <<a class="code" href="FTExtrdGlyph_8h.html">FTGL/FTExtrdGlyph.h</a>></span> <a name="l00118"></a>00118 <span class="preprocessor">#include <<a class="code" href="FTOutlineGlyph_8h.html">FTGL/FTOutlineGlyph.h</a>></span> <a name="l00119"></a>00119 <span class="preprocessor">#include <<a class="code" href="FTPixmapGlyph_8h.html">FTGL/FTPixmapGlyph.h</a>></span> <a name="l00120"></a>00120 <span class="preprocessor">#include <<a class="code" href="FTPolyGlyph_8h.html">FTGL/FTPolyGlyph.h</a>></span> <a name="l00121"></a>00121 <span class="preprocessor">#include <<a class="code" href="FTTextureGlyph_8h.html">FTGL/FTTextureGlyph.h</a>></span> <a name="l00122"></a>00122 <a name="l00123"></a>00123 <span class="preprocessor">#include <<a class="code" href="FTFont_8h.html">FTGL/FTFont.h</a>></span> <a name="l00124"></a>00124 <span class="preprocessor">#include <<a class="code" href="FTGLBitmapFont_8h.html">FTGL/FTGLBitmapFont.h</a>></span> <a name="l00125"></a>00125 <span class="preprocessor">#include <<a class="code" href="FTBufferFont_8h.html">FTGL/FTBufferFont.h</a>></span> <a name="l00126"></a>00126 <span class="preprocessor">#include <<a class="code" href="FTGLExtrdFont_8h.html">FTGL/FTGLExtrdFont.h</a>></span> <a name="l00127"></a>00127 <span class="preprocessor">#include <<a class="code" href="FTGLOutlineFont_8h.html">FTGL/FTGLOutlineFont.h</a>></span> <a name="l00128"></a>00128 <span class="preprocessor">#include <<a class="code" href="FTGLPixmapFont_8h.html">FTGL/FTGLPixmapFont.h</a>></span> <a name="l00129"></a>00129 <span class="preprocessor">#include <<a class="code" href="FTGLPolygonFont_8h.html">FTGL/FTGLPolygonFont.h</a>></span> <a name="l00130"></a>00130 <span class="preprocessor">#include <<a class="code" href="FTGLTextureFont_8h.html">FTGL/FTGLTextureFont.h</a>></span> <a name="l00131"></a>00131 <a name="l00132"></a>00132 <span class="preprocessor">#include <<a class="code" href="FTLayout_8h.html">FTGL/FTLayout.h</a>></span> <a name="l00133"></a>00133 <span class="preprocessor">#include <<a class="code" href="FTSimpleLayout_8h.html">FTGL/FTSimpleLayout.h</a>></span> <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="preprocessor">#endif // __ftgl__</span> </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>