blob: 5085a65f6751f0b7b753c8e8e8e6983cd3c07cde [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FTGL: FTSize class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>FTSize Class Reference</h1><code>#include &lt;<a class="el" href="FTSize_8h-source.html">FTSize.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
FTSize class provides an abstraction layer for the Freetype Size.
<p>
<dl compact><dt><b>See also:</b></dt><dd>"Freetype 2 Documentation" </dd></dl>
<p>
<p>
Definition at line <a class="el" href="FTSize_8h-source.html#l00018">18</a> of file <a class="el" href="FTSize_8h-source.html">FTSize.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a0">FTSize</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default Constructor. <a href="#a0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a1">~FTSize</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#a1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a2">CharSize</a> (FT_Face *face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the char size for the current face. <a href="#a2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a3">CharSize</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the char size for the current face. <a href="#a3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a4">Ascender</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the global ascender height for the face in pixels. <a href="#a4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a5">Descender</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the global descender height for the face in pixels. <a href="#a5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a6">Height</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the global face height for the face. <a href="#a6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a7">Width</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the global face width for the face. <a href="#a7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a8">Underline</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the underline position for the face. <a href="#a8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>FT_Error&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTSize.html#a9">Error</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Queries for errors. <a href="#a9"></a><br><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="FTSize::FTSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> FTSize::FTSize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Default Constructor.
<p>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00004">4</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="FTSize::~FTSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> FTSize::~<a class="el" href="classFTSize.html">FTSize</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destructor.
<p>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00014">14</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a4" doxytag="FTSize::Ascender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float FTSize::Ascender </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the global ascender height for the face in pixels.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Ascender height </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00052">52</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>.
<p>
Referenced by <a class="el" href="FTFont_8cpp-source.html#l00119">FTFont::Ascender()</a>. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="FTSize::CharSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned int FTSize::CharSize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
get the char size for the current face.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The char size in points </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00046">46</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="FTSize::CharSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool FTSize::CharSize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">FT_Face *&nbsp;</td>
<td class="mdname" nowrap> <em>face</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>point_size</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>x_resolution</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>y_resolution</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the char size for the current face.
<p>
This doesn't guarantee that the size was set correctly. Clients should check errors.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>face</em>&nbsp;</td><td>Parent face for this size object </td></tr>
<tr><td valign=top><em>point_size</em>&nbsp;</td><td>the face size in points (1/72 inch) </td></tr>
<tr><td valign=top><em>x_resolution</em>&nbsp;</td><td>the horizontal resolution of the target device. </td></tr>
<tr><td valign=top><em>y_resolution</em>&nbsp;</td><td>the vertical resolution of the target device. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if the size has been set. Clients should check <a class="el" href="classFTSize.html#a9">Error()</a> for more information if this function returns false() </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00018">18</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>.
<p>
Referenced by <a class="el" href="FTFont_8cpp-source.html#l00088">FTFont::FaceSize()</a>, and <a class="el" href="FTFace_8cpp-source.html#l00081">FTFace::Size()</a>. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="FTSize::Descender" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float FTSize::Descender </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the global descender height for the face in pixels.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Ascender height </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00058">58</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>.
<p>
Referenced by <a class="el" href="FTFont_8cpp-source.html#l00125">FTFont::Descender()</a>. </td>
</tr>
</table>
<a class="anchor" name="a9" doxytag="FTSize::Error" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> FT_Error FTSize::Error </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Queries for errors.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The current error code. </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8h-source.html#l00102">102</a> of file <a class="el" href="FTSize_8h-source.html">FTSize.h</a>.
<p>
Referenced by <a class="el" href="FTFace_8cpp-source.html#l00081">FTFace::Size()</a>. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="FTSize::Height" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float FTSize::Height </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the global face height for the face.
<p>
If the face is scalable this returns the height of the global bounding box which ensures that any glyph will be less than or equal to this height. If the font isn't scalable there is no guarantee that glyphs will not be taller than this value.<p>
<dl compact><dt><b>Returns:</b></dt><dd>height in pixels. </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00064">64</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>.
<p>
Referenced by <a class="el" href="FTFont_8cpp-source.html#l00130">FTFont::LineHeight()</a>. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="FTSize::Underline" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float FTSize::Underline </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the underline position for the face.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>underline position in pixels </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00100">100</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="FTSize::Width" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> float FTSize::Width </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the global face width for the face.
<p>
If the face is scalable this returns the width of the global bounding box which ensures that any glyph will be less than or equal to this width. If the font isn't scalable this value is the max_advance for the face.<p>
<dl compact><dt><b>Returns:</b></dt><dd>width in pixels. </dd></dl>
<p>
Definition at line <a class="el" href="FTSize_8cpp-source.html#l00082">82</a> of file <a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="FTSize_8h-source.html">FTSize.h</a><li><a class="el" href="FTSize_8cpp-source.html">FTSize.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sun Dec 5 22:24:07 2004 for FTGL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>