zengine/doc/html/ZE__ZFont_8h-source.html
2003-04-28 02:36:07 +00:00

97 lines
7.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>/include/ZE_ZFont.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3-rc2 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>/include/ZE_ZFont.h</h1><a href="ZE__ZFont_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*******************************************************************************</span>
00002 <span class="comment"> This file is Part of the ZEngine Library for 2D game development.</span>
00003 <span class="comment"> Copyright (C) 2002, 2003 James Turk</span>
00004 <span class="comment"></span>
00005 <span class="comment"> Licensed under a BSD-style license.</span>
00006 <span class="comment"></span>
00007 <span class="comment"> The maintainer of this library is James Turk (james@conceptofzero.net) </span>
00008 <span class="comment"> and the home of this Library is http://www.zengine.sourceforge.net</span>
00009 <span class="comment">*******************************************************************************/</span>
00010
00024 <span class="preprocessor">#ifndef __ze_zfont_h__</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#define __ze_zfont_h__</span>
00026 <span class="preprocessor"></span>
00027 <span class="preprocessor">#include "<a class="code" href="ZE__ZEngine_8h.html">ZE_ZEngine.h</a>"</span>
00028 <span class="preprocessor">#include "<a class="code" href="ZE__ZImage_8h.html">ZE_ZImage.h</a>"</span>
00029
00030 <span class="preprocessor">#ifdef USE_SDL_TTF</span>
00031 <span class="preprocessor"></span>
00032 <span class="keyword">namespace </span>ZE
00033 {
00034
<a name="l00040"></a><a class="code" href="classZE_1_1ZFont.html">00040</a> <span class="keyword">class </span><a class="code" href="classZE_1_1ZFont.html">ZFont</a>
00041 {
00042 <span class="keyword">protected</span>:
<a name="l00044"></a><a class="code" href="classZE_1_1ZFont.html#n0">00044</a> <a class="code" href="classZE_1_1ZEngine.html">ZEngine</a>* <a class="code" href="classZE_1_1ZFont.html#n0">rEngine</a>;
<a name="l00046"></a><a class="code" href="classZE_1_1ZFont.html#n1">00046</a> TTF_Font *<a class="code" href="classZE_1_1ZFont.html#n1">rFont</a>;
<a name="l00048"></a><a class="code" href="classZE_1_1ZFont.html#n2">00048</a> string <a class="code" href="classZE_1_1ZFont.html#n2">rFilename</a>;
<a name="l00050"></a><a class="code" href="classZE_1_1ZFont.html#n3">00050</a> SDL_Color <a class="code" href="classZE_1_1ZFont.html#n3">rColor</a>;
<a name="l00052"></a><a class="code" href="classZE_1_1ZFont.html#n4">00052</a> SDL_Color <a class="code" href="classZE_1_1ZFont.html#n4">rBGColor</a>;
00053
00054 <span class="keyword">public</span>:
00055
00057 <span class="comment">//Opening and Closing//</span>
00059 <span class="comment"></span>
00065 <span class="comment"></span> <a class="code" href="classZE_1_1ZFont.html#a0">ZFont</a>();
00066
00074 <a class="code" href="classZE_1_1ZFont.html#a0">ZFont</a>(string filename, <span class="keywordtype">int</span> size);
00075
00081 <span class="keyword">virtual</span> <a class="code" href="classZE_1_1ZFont.html#a2">~ZFont</a>();
00082
00090 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a3">Open</a>(string filename, <span class="keywordtype">int</span> size);
00091
00097 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a4">Release</a>();
00098
00100 <span class="comment">//Settings and Drawing//</span>
00102 <span class="comment"></span>
00110 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a5">DrawText</a>(string text, <a class="code" href="classZE_1_1ZImage.html">ZImage</a> &amp;image) <span class="keyword">const</span>;
00111
00119 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a6">DrawShadedText</a>(string text, <a class="code" href="classZE_1_1ZImage.html">ZImage</a> &amp;image) <span class="keyword">const</span>;
00120
00129 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a7">SetColor</a>(Uint8 r, Uint8 g, Uint8 b);
00130
00139 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a8">SetBGColor</a>(Uint8 r, Uint8 g, Uint8 b);
00140
00149 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a9">SetStyle</a>(<span class="keywordtype">bool</span> bold, <span class="keywordtype">bool</span> italic, <span class="keywordtype">bool</span> underline);
00150
00157 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZFont.html#a10">Resize</a>(<span class="keywordtype">int</span> size);
00158
00160 <span class="comment">//Accessors//</span>
00162 <span class="comment"></span>
00169 <span class="comment"></span> <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZFont.html#a11">IsLoaded</a>() <span class="keyword">const</span>;
00170
00177 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZFont.html#a12">IsBold</a>() <span class="keyword">const</span>;
00178
00185 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZFont.html#a13">IsItalic</a>() <span class="keyword">const</span>;
00186
00193 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZFont.html#a14">IsUnderlined</a>() <span class="keyword">const</span>;
00194
00201 <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZFont.html#a15">Height</a>() <span class="keyword">const</span>;
00202
00209 <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZFont.html#a16">LineSkip</a>() <span class="keyword">const</span>;
00210
00218 <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZFont.html#a17">StringWidth</a>(string text) <span class="keyword">const</span>;
00219
00227 <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZFont.html#a18">StringHeight</a>(string text) <span class="keyword">const</span>;
00228 };
00229
00230 }
00231
00232 <span class="preprocessor">#endif //USE_SDL_TTF</span>
00233 <span class="preprocessor"></span>
00234 <span class="preprocessor">#endif //__ze_zfont_h__</span>
</pre></div><hr><address style="align: right;"><small>Generated on Sun Apr 27 22:34:35 2003 for ZEngine by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.3-rc2 </small></address>
</body>
</html>