<!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: FTBuffer.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>FTBuffer.h</h1><a href="FTBuffer_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) 2008 Sam Hocevar <sam@zoy.org></span> <a name="l00005"></a>00005 <span class="comment"> *</span> <a name="l00006"></a>00006 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span> <a name="l00007"></a>00007 <span class="comment"> * a copy of this software and associated documentation files (the</span> <a name="l00008"></a>00008 <span class="comment"> * "Software"), to deal in the Software without restriction, including</span> <a name="l00009"></a>00009 <span class="comment"> * without limitation the rights to use, copy, modify, merge, publish,</span> <a name="l00010"></a>00010 <span class="comment"> * distribute, sublicense, and/or sell copies of the Software, and to</span> <a name="l00011"></a>00011 <span class="comment"> * permit persons to whom the Software is furnished to do so, subject to</span> <a name="l00012"></a>00012 <span class="comment"> * the following conditions:</span> <a name="l00013"></a>00013 <span class="comment"> *</span> <a name="l00014"></a>00014 <span class="comment"> * The above copyright notice and this permission notice shall be</span> <a name="l00015"></a>00015 <span class="comment"> * included in all copies or substantial portions of the Software.</span> <a name="l00016"></a>00016 <span class="comment"> *</span> <a name="l00017"></a>00017 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span> <a name="l00018"></a>00018 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span> <a name="l00019"></a>00019 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</span> <a name="l00020"></a>00020 <span class="comment"> * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY</span> <a name="l00021"></a>00021 <span class="comment"> * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,</span> <a name="l00022"></a>00022 <span class="comment"> * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE</span> <a name="l00023"></a>00023 <span class="comment"> * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span> <a name="l00024"></a>00024 <span class="comment"> */</span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="preprocessor">#ifndef __ftgl__</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor"># warning Please use <FTGL/ftgl.h> instead of <FTBuffer.h>.</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor"># include <<a class="code" href="ftgl_8h.html">FTGL/ftgl.h</a>></span> <a name="l00029"></a>00029 <span class="preprocessor">#endif</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00031"></a>00031 <span class="preprocessor">#ifndef __FTBuffer__</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define __FTBuffer__</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00035"></a>00035 <span class="preprocessor"></span> <a name="l00045"></a><a class="code" href="classFTBuffer.html">00045</a> <span class="keyword">class </span><a class="code" href="ftgl_8h.html#ae472b08d77a4ead09abe74fe37220270">FTGL_EXPORT</a> <a class="code" href="classFTBuffer.html" title="FTBuffer is a helper class for pixel buffers.">FTBuffer</a> <a name="l00046"></a>00046 { <a name="l00047"></a>00047 <span class="keyword">public</span>: <a name="l00051"></a>00051 <a class="code" href="classFTBuffer.html" title="FTBuffer is a helper class for pixel buffers.">FTBuffer</a>(); <a name="l00052"></a>00052 <a name="l00056"></a>00056 ~<a class="code" href="classFTBuffer.html" title="FTBuffer is a helper class for pixel buffers.">FTBuffer</a>(); <a name="l00057"></a>00057 <a name="l00063"></a><a class="code" href="classFTBuffer.html#a5b5dedc85576f519bd804bb0e8a6b8a0">00063</a> <span class="keyword">inline</span> <a class="code" href="classFTPoint.html" title="FTPoint class is a basic 3-dimensional point or vector.">FTPoint</a> Pos()<span class="keyword"> const</span> <a name="l00064"></a>00064 <span class="keyword"> </span>{ <a name="l00065"></a>00065 <span class="keywordflow">return</span> pos; <a name="l00066"></a>00066 } <a name="l00067"></a>00067 <a name="l00073"></a><a class="code" href="classFTBuffer.html#a97ae51522466bfa08a719f439e0059a0">00073</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> Pos(<a class="code" href="classFTPoint.html" title="FTPoint class is a basic 3-dimensional point or vector.">FTPoint</a> arg) <a name="l00074"></a>00074 { <a name="l00075"></a>00075 pos = arg; <a name="l00076"></a>00076 } <a name="l00077"></a>00077 <a name="l00084"></a>00084 <span class="keywordtype">void</span> Size(<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h); <a name="l00085"></a>00085 <a name="l00091"></a><a class="code" href="classFTBuffer.html#a19cfff5527c3e04ec59f0cfa295d6abe">00091</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classFTBuffer.html#a19cfff5527c3e04ec59f0cfa295d6abe" title="Get the buffer&#39;s width.">Width</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> width; } <a name="l00092"></a>00092 <a name="l00098"></a><a class="code" href="classFTBuffer.html#a97c058c883b1b6d25242964a025faf0f">00098</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classFTBuffer.html#a97c058c883b1b6d25242964a025faf0f" title="Get the buffer&#39;s height.">Height</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> height; } <a name="l00099"></a>00099 <a name="l00105"></a><a class="code" href="classFTBuffer.html#a394321c98ce6bc4f016337cb1e9237fb">00105</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="classFTBuffer.html#a394321c98ce6bc4f016337cb1e9237fb" title="Get the buffer&#39;s direct pixel buffer.">Pixels</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> pixels; } <a name="l00106"></a>00106 <a name="l00107"></a>00107 <span class="keyword">private</span>: <a name="l00111"></a>00111 <span class="keywordtype">int</span> width, height; <a name="l00112"></a>00112 <a name="l00116"></a>00116 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pixels; <a name="l00117"></a>00117 <a name="l00121"></a>00121 <a class="code" href="classFTPoint.html" title="FTPoint class is a basic 3-dimensional point or vector.">FTPoint</a> pos; <a name="l00122"></a>00122 }; <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="preprocessor">#endif //__cplusplus</span> <a name="l00125"></a>00125 <span class="preprocessor"></span> <a name="l00126"></a>00126 <span class="preprocessor">#endif // __FTBuffer__</span> <a name="l00127"></a>00127 <span class="preprocessor"></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>