⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__nanox__font.html

📁 Nano-x的设计架及相关文档----这是网上下载的中文翻译版本, E文的可以在其网站上下载.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>Nano-X font API.</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center><hr><h1>Nano-X font API.<br><small>[<a class="el" href="group__nanox.html">Nano-X public API</a>]</small></h1>Functions for handling fonts and drawing text. <a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a0">GrGetFontInfo</a> (GR_FONT_ID font, GR_FONT_INFO *fip)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Gets information about a font.</em> <a href="#a0"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a1">GrGetGCTextSize</a> (GR_GC_ID gc, void *str, int count, GR_TEXTFLAGS flags, GR_SIZE *retwidth, GR_SIZE *retheight, GR_SIZE *retbase)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Calculates the dimensions of a specified text string.</em> <a href="#a1"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>GR_FONT_ID&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a2">GrCreateFont</a> (GR_CHAR *name, GR_COORD height, GR_LOGFONT *plogfont)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Attempts to locate a font with the desired attributes and returns a font ID number which can be used to refer to it.</em> <a href="#a2"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a3">GrGetFontList</a> (GR_FONTLIST ***fonts, int *numfonts)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Returns an array of strings containing the names of available fonts and an integer that specifies the number of strings returned.</em> <a href="#a3"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a4">GrFreeFontList</a> (GR_FONTLIST ***fonts, int numfonts)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Frees the specified font list array.</em> <a href="#a4"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a5">GrSetFontSize</a> (GR_FONT_ID fontid, GR_COORD size)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Changes the size of the specified font to the specified size.</em> <a href="#a5"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a6">GrSetFontRotation</a> (GR_FONT_ID fontid, int tenthsdegrees)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Changes the rotation of the specified font to the specified angle.</em> <a href="#a6"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a7">GrSetFontAttr</a> (GR_FONT_ID fontid, int setflags, int clrflags)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Changes the attributes (GR_TFKERNING, GR_TFANTIALIAS, GR_TFUNDERLINE, etc.) of the specified font according to the set and clear mask arguments.</em> <a href="#a7"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a8">GrDestroyFont</a> (GR_FONT_ID fontid)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Frees all resources associated with the specified font ID, and if the font is a non built in type and this is the last ID referring to it, unloads the font from memory.</em> <a href="#a8"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a9">GrSetGCFont</a> (GR_GC_ID gc, GR_FONT_ID font)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Sets the font to be used for text drawing in the specified graphics context to the specified font ID.</em> <a href="#a9"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__font.html#a10">GrText</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, void *str, GR_COUNT count, GR_TEXTFLAGS flags)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Draws the specified text string at the specified position on the specified drawable using the specified graphics context and flags.</em> <a href="#a10"></a><em></em><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions for handling fonts and drawing text.<p><hr><h2>Function Documentation</h2><a name="a2" doxytag="nano-X.h::GrCreateFont"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> GR_FONT_ID GrCreateFont </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_CHAR *&nbsp;</td>          <td class="mdname" nowrap> <em>name</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_COORD&nbsp;</td>          <td class="mdname" nowrap> <em>height</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_LOGFONT *&nbsp;</td>          <td class="mdname" nowrap> <em>plogfont</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>Attempts to locate a font with the desired attributes and returns a font ID number which can be used to refer to it.<p>If the plogfont argument is not NULL, the values in that structure will be used to choose a font. Otherwise, if the height is non zero, the built in font with the closest height to that specified will be used. If the height is zero, the built in font with the specified name will be used. If the desired font is not found, the first built in font will be returned as a last resort.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>name</em>&nbsp;</td><td>string containing the name of a built in font to look for </td></tr>    <tr><td valign=top><em>height</em>&nbsp;</td><td>the desired height of the font </td></tr>    <tr><td valign=top><em>plogfont</em>&nbsp;</td><td>pointer to a LOGFONT structure </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>a font ID number which can be used to refer to the font </dd></dl>    </td>  </tr></table><a name="a8" doxytag="nano-X.h::GrDestroyFont"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void GrDestroyFont </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_FONT_ID&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>fontid</em>          </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>Frees all resources associated with the specified font ID, and if the font is a non built in type and this is the last ID referring to it, unloads the font from memory.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>fontid</em>&nbsp;</td><td>the ID of the font to destroy </td></tr>  </table></dl>    </td>  </tr></table><a name="a4" doxytag="nano-X.h::GrFreeFontList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void GrFreeFontList </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_FONTLIST ***&nbsp;</td>          <td class="mdname" nowrap> <em>fonts</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>numfonts</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>Frees the specified font list array.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>fonts</em>&nbsp;</td><td>Pointer to array returned by <a class="el" href="group__nanox__font.html#a3">GrGetFontList()</a>. </td></tr>    <tr><td valign=top><em>numfonts</em>&nbsp;</td><td>The number of font names in the array. </td></tr>  </table></dl>    </td>  </tr></table><a name="a0" doxytag="nano-X.h::GrGetFontInfo"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void GrGetFontInfo </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_FONT_ID&nbsp;</td>          <td class="mdname" nowrap> <em>font</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_FONT_INFO *&nbsp;</td>          <td class="mdname" nowrap> <em>fip</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>Gets information about a font.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>font</em>&nbsp;</td><td>The font ID to query. </td></tr>    <tr><td valign=top><em>fip</em>&nbsp;</td><td>Pointer to the GR_FONT_INFO structure to store the result. </td></tr>  </table></dl>    </td>  </tr></table><a name="a3" doxytag="nano-X.h::GrGetFontList"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void GrGetFontList </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_FONTLIST ***&nbsp;</td>          <td class="mdname" nowrap> <em>fonts</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int *&nbsp;</td>          <td class="mdname" nowrap> <em>numfonts</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>Returns an array of strings containing the names of available fonts and an integer that specifies the number of strings returned.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>fonts</em>&nbsp;</td><td>pointer used to return an array of font names. </td></tr>    <tr><td valign=top><em>numfonts</em>&nbsp;</td><td>pointer used to return the number of names found. </td></tr>  </table></dl>    </td>  </tr></table><a name="a1" doxytag="nano-X.h::GrGetGCTextSize"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void GrGetGCTextSize </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_GC_ID&nbsp;</td>          <td class="mdname" nowrap> <em>gc</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap> <em>str</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>count</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_TEXTFLAGS&nbsp;</td>          <td class="mdname" nowrap> <em>flags</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_SIZE *&nbsp;</td>          <td class="mdname" nowrap> <em>retwidth</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_SIZE *&nbsp;</td>          <td class="mdname" nowrap> <em>retheight</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_SIZE *&nbsp;</td>          <td class="mdname" nowrap> <em>retbase</em></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -