Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 2

icu-doc-3.8.1-2mdv2008.1.x86_64.rpm

<!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>ICU 3.8: LEFontInstance.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>LEFontInstance.h</h1><a href="LEFontInstance_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef __LEFONTINSTANCE_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define __LEFONTINSTANCE_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="LETypes_8h.html">LETypes.h</a>"</span>
<a name="l00017"></a>00017 <a class="code" href="uversion_8h.html#7d9374e037299886d4192b763b4c5e8b">U_NAMESPACE_BEGIN</a>
<a name="l00018"></a>00018 
<a name="l00028"></a><a class="code" href="classLECharMapper.html">00028</a> <span class="keyword">class </span><a class="code" href="classLECharMapper.html">LECharMapper</a> <span class="comment">/* not : public UObject because this is an interface/mixin class */</span>
<a name="l00029"></a>00029 {
<a name="l00030"></a>00030 <span class="keyword">public</span>:
<a name="l00035"></a>00035     <span class="keyword">virtual</span> <a class="code" href="classLECharMapper.html#a33a80a6f3612726e7c4a0441975565a">~LECharMapper</a>();
<a name="l00036"></a>00036 
<a name="l00046"></a>00046     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> <a class="code" href="classLECharMapper.html#d6d2a742bac6c29f894aef5fc7efbdaf">mapChar</a>(<a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> ch) <span class="keyword">const </span>= 0;
<a name="l00047"></a>00047 };
<a name="l00048"></a>00048 
<a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="classLEGlyphStorage.html">LEGlyphStorage</a>;
<a name="l00056"></a>00056 
<a name="l00081"></a><a class="code" href="classLEFontInstance.html">00081</a> <span class="keyword">class </span><a class="code" href="utypes_8h.html#623f81640d6092d9141a1d4d24ccaffc">U_LAYOUT_API</a> <a class="code" href="classLEFontInstance.html">LEFontInstance</a> : <span class="keyword">public</span> <a class="code" href="classUObject.html">UObject</a>
<a name="l00082"></a>00082 {
<a name="l00083"></a>00083 <span class="keyword">public</span>:
<a name="l00084"></a>00084 
<a name="l00091"></a>00091     <span class="keyword">virtual</span> ~<a class="code" href="classLEFontInstance.html">LEFontInstance</a>();
<a name="l00092"></a>00092 
<a name="l00144"></a>00144     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classLEFontInstance.html">LEFontInstance</a> *getSubFont(<span class="keyword">const</span> <a class="code" href="LETypes_8h.html#903cb689308cdef41500411d096a2c2d">LEUnicode</a> chars[], <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> *offset, <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> limit, <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> script, <a class="code" href="LETypes_8h.html#2f75d3bb5abf7f0a71adbf00826e1934">LEErrorCode</a> &amp;success) <span class="keyword">const</span>;
<a name="l00145"></a>00145 
<a name="l00146"></a>00146     <span class="comment">//</span>
<a name="l00147"></a>00147     <span class="comment">// Font file access</span>
<a name="l00148"></a>00148     <span class="comment">//</span>
<a name="l00149"></a>00149 
<a name="l00166"></a>00166     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span> *getFontTable(<a class="code" href="LETypes_8h.html#9e22a06bf2336b583b317287cb94fcfa">LETag</a> tableTag) <span class="keyword">const </span>= 0;
<a name="l00167"></a>00167 
<a name="l00184"></a>00184     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#4b77bc254d0e88fdabffde9c03e6728f">le_bool</a> canDisplay(<a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> ch) <span class="keyword">const</span>;
<a name="l00185"></a>00185 
<a name="l00194"></a>00194     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> getUnitsPerEM() <span class="keyword">const </span>= 0;
<a name="l00195"></a>00195 
<a name="l00219"></a>00219     <span class="keyword">virtual</span> <span class="keywordtype">void</span> mapCharsToGlyphs(<span class="keyword">const</span> <a class="code" href="LETypes_8h.html#903cb689308cdef41500411d096a2c2d">LEUnicode</a> chars[], <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> offset, <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> count, <a class="code" href="LETypes_8h.html#4b77bc254d0e88fdabffde9c03e6728f">le_bool</a> reverse, <span class="keyword">const</span> <a class="code" href="classLECharMapper.html">LECharMapper</a> *mapper, <a class="code" href="LETypes_8h.html#4b77bc254d0e88fdabffde9c03e6728f">le_bool</a> filterZeroWidth, <a class="code" href="classLEGlyphStorage.html">LEGlyphStorage</a> &amp;glyphStorage) <span class="keyword">const</span>;
<a name="l00220"></a>00220 
<a name="l00236"></a>00236     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#e440e077586bced1a0d1c534643ffc23">LEGlyphID</a> mapCharToGlyph(<a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> ch, <span class="keyword">const</span> <a class="code" href="classLECharMapper.html">LECharMapper</a> *mapper, <a class="code" href="LETypes_8h.html#4b77bc254d0e88fdabffde9c03e6728f">le_bool</a> filterZeroWidth) <span class="keyword">const</span>;
<a name="l00237"></a>00237 
<a name="l00252"></a>00252     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#e440e077586bced1a0d1c534643ffc23">LEGlyphID</a> mapCharToGlyph(<a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> ch, <span class="keyword">const</span> <a class="code" href="classLECharMapper.html">LECharMapper</a> *mapper) <span class="keyword">const</span>;
<a name="l00253"></a>00253 
<a name="l00266"></a>00266     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#e440e077586bced1a0d1c534643ffc23">LEGlyphID</a> mapCharToGlyph(<a class="code" href="LETypes_8h.html#25ed173b2a50d1ab11df41caf054fdb7">LEUnicode32</a> ch) <span class="keyword">const </span>= 0;
<a name="l00267"></a>00267 
<a name="l00268"></a>00268     <span class="comment">//</span>
<a name="l00269"></a>00269     <span class="comment">// Metrics</span>
<a name="l00270"></a>00270     <span class="comment">//</span>
<a name="l00271"></a>00271 
<a name="l00280"></a>00280     <span class="keyword">virtual</span> <span class="keywordtype">void</span> getGlyphAdvance(<a class="code" href="LETypes_8h.html#e440e077586bced1a0d1c534643ffc23">LEGlyphID</a> glyph, <a class="code" href="structLEPoint.html">LEPoint</a> &amp;advance) <span class="keyword">const </span>= 0;
<a name="l00281"></a>00281 
<a name="l00294"></a>00294     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#4b77bc254d0e88fdabffde9c03e6728f">le_bool</a> getGlyphPoint(<a class="code" href="LETypes_8h.html#e440e077586bced1a0d1c534643ffc23">LEGlyphID</a> glyph, <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> pointNumber, <a class="code" href="structLEPoint.html">LEPoint</a> &amp;point) <span class="keyword">const </span>= 0;
<a name="l00295"></a>00295 
<a name="l00304"></a>00304     <span class="keyword">virtual</span> <span class="keywordtype">float</span> getXPixelsPerEm() <span class="keyword">const </span>= 0;
<a name="l00305"></a>00305 
<a name="l00314"></a>00314     <span class="keyword">virtual</span> <span class="keywordtype">float</span> getYPixelsPerEm() <span class="keyword">const </span>= 0;
<a name="l00315"></a>00315 
<a name="l00326"></a>00326     <span class="keyword">virtual</span> <span class="keywordtype">float</span> xUnitsToPoints(<span class="keywordtype">float</span> xUnits) <span class="keyword">const</span>;
<a name="l00327"></a>00327 
<a name="l00338"></a>00338     <span class="keyword">virtual</span> <span class="keywordtype">float</span> yUnitsToPoints(<span class="keywordtype">float</span> yUnits) <span class="keyword">const</span>;
<a name="l00339"></a>00339 
<a name="l00348"></a>00348     <span class="keyword">virtual</span> <span class="keywordtype">void</span> unitsToPoints(<a class="code" href="structLEPoint.html">LEPoint</a> &amp;units, <a class="code" href="structLEPoint.html">LEPoint</a> &amp;points) <span class="keyword">const</span>;
<a name="l00349"></a>00349 
<a name="l00360"></a>00360     <span class="keyword">virtual</span> <span class="keywordtype">float</span> xPixelsToUnits(<span class="keywordtype">float</span> xPixels) <span class="keyword">const</span>;
<a name="l00361"></a>00361 
<a name="l00372"></a>00372     <span class="keyword">virtual</span> <span class="keywordtype">float</span> yPixelsToUnits(<span class="keywordtype">float</span> yPixels) <span class="keyword">const</span>;
<a name="l00373"></a>00373 
<a name="l00382"></a>00382     <span class="keyword">virtual</span> <span class="keywordtype">void</span> pixelsToUnits(<a class="code" href="structLEPoint.html">LEPoint</a> &amp;pixels, <a class="code" href="structLEPoint.html">LEPoint</a> &amp;units) <span class="keyword">const</span>;
<a name="l00383"></a>00383 
<a name="l00395"></a>00395     <span class="keyword">virtual</span> <span class="keywordtype">float</span> getScaleFactorX() <span class="keyword">const </span>= 0;
<a name="l00396"></a>00396 
<a name="l00407"></a>00407     <span class="keyword">virtual</span> <span class="keywordtype">float</span> getScaleFactorY() <span class="keyword">const </span>= 0;
<a name="l00408"></a>00408 
<a name="l00424"></a>00424     <span class="keyword">virtual</span> <span class="keywordtype">void</span> transformFunits(<span class="keywordtype">float</span> xFunits, <span class="keywordtype">float</span> yFunits, <a class="code" href="structLEPoint.html">LEPoint</a> &amp;pixels) <span class="keyword">const</span>;
<a name="l00425"></a>00425 
<a name="l00436"></a>00436     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> fixedToFloat(<a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> fixed);
<a name="l00437"></a>00437 
<a name="l00448"></a>00448     <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> floatToFixed(<span class="keywordtype">float</span> theFloat);
<a name="l00449"></a>00449 
<a name="l00450"></a>00450     <span class="comment">//</span>
<a name="l00451"></a>00451     <span class="comment">// These methods won't ever be called by the LayoutEngine,</span>
<a name="l00452"></a>00452     <span class="comment">// but are useful for clients of &lt;code&gt;LEFontInstance&lt;/code&gt; who</span>
<a name="l00453"></a>00453     <span class="comment">// need to render text.</span>
<a name="l00454"></a>00454     <span class="comment">//</span>
<a name="l00455"></a>00455 
<a name="l00464"></a>00464     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> getAscent() <span class="keyword">const </span>= 0;
<a name="l00465"></a>00465 
<a name="l00474"></a>00474     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> getDescent() <span class="keyword">const </span>= 0;
<a name="l00475"></a>00475 
<a name="l00484"></a>00484     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> getLeading() <span class="keyword">const </span>= 0;
<a name="l00485"></a>00485 
<a name="l00496"></a>00496     <span class="keyword">virtual</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> getLineHeight() <span class="keyword">const</span>;
<a name="l00497"></a>00497 
<a name="l00503"></a>00503     <span class="keyword">virtual</span> <a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> <a class="code" href="classUObject.html#ce1dd31fb2c6f2c07dfebe8fd240ec37">getDynamicClassID</a>() <span class="keyword">const</span>;
<a name="l00504"></a>00504 
<a name="l00510"></a>00510     <span class="keyword">static</span> <a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> getStaticClassID();
<a name="l00511"></a>00511 
<a name="l00512"></a>00512 };
<a name="l00513"></a>00513 
<a name="l00514"></a><a class="code" href="classLEFontInstance.html#e6c01ddc73d5f9dec656bc2845fdfd4b">00514</a> <span class="keyword">inline</span> <span class="keywordtype">float</span> <a class="code" href="classLEFontInstance.html#e6c01ddc73d5f9dec656bc2845fdfd4b">LEFontInstance::fixedToFloat</a>(<a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> fixed)
<a name="l00515"></a>00515 {
<a name="l00516"></a>00516     <span class="keywordflow">return</span> (<span class="keywordtype">float</span>) (fixed / 65536.0);
<a name="l00517"></a>00517 }
<a name="l00518"></a>00518 
<a name="l00519"></a><a class="code" href="classLEFontInstance.html#9102c10c6835d4007820f3e72ebf38cd">00519</a> <span class="keyword">inline</span> <a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a> <a class="code" href="classLEFontInstance.html#9102c10c6835d4007820f3e72ebf38cd">LEFontInstance::floatToFixed</a>(<span class="keywordtype">float</span> theFloat)
<a name="l00520"></a>00520 {
<a name="l00521"></a>00521     <span class="keywordflow">return</span> (<a class="code" href="LETypes_8h.html#3ae79f31399d76e3055d2a2745bd0d9a">le_int32</a>) (theFloat * 65536.0);
<a name="l00522"></a>00522 }
<a name="l00523"></a>00523 
<a name="l00524"></a>00524 <a class="code" href="uversion_8h.html#3da1f00f3b02976ac53c014a3e4c0933">U_NAMESPACE_END</a>
<a name="l00525"></a>00525 <span class="preprocessor">#endif</span>
<a name="l00526"></a>00526 <span class="preprocessor"></span>
<a name="l00527"></a>00527 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:19 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>