📄 group__nanox__draw.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>Nano-X drawing 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> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="pages.html">Related Pages</a> </center><hr><h1>Nano-X drawing API.<br><small>[<a class="el" href="group__nanox.html">Nano-X public API</a>]</small></h1>Functions for actually drawing primitive shapes on the screen. <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 </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a0">GrGetGCInfo</a> (GR_GC_ID gc, <a class="el" href="structGR__GC__INFO.html">GR_GC_INFO</a> *gcip)</td></tr><tr><td> </td><td><em class="mdesc">Fills in the specified <a class="el" href="structGR__GC__INFO.html">GR_GC_INFO</a> structure with information regarding the specified graphics context.</em> <a href="#a0"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>GR_GC_ID </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a1">GrNewGC</a> (void)</td></tr><tr><td> </td><td><em class="mdesc">Creates a new graphics context structure.</em> <a href="#a1"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>GR_GC_ID </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a2">GrCopyGC</a> (GR_GC_ID gc)</td></tr><tr><td> </td><td><em class="mdesc">Creates a new graphics context structure and copies the settings from an already existing graphics context.</em> <a href="#a2"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a3">GrDestroyGC</a> (GR_GC_ID gc)</td></tr><tr><td> </td><td><em class="mdesc">Destroys a graphics context structure.</em> <a href="#a3"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a4">GrSetGCClipOrigin</a> (GR_GC_ID gc, int x, int y)</td></tr><tr><td> </td><td><em class="mdesc">Sets the X,Y origin of the user clip region in the specified graphics context.</em> <a href="#a4"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a5">GrSetGCGraphicsExposure</a> (GR_GC_ID gc, GR_BOOL exposure)</td></tr><tr><td> </td><td><em class="mdesc">Controls if GR_EVENT_TYPE_EXPOSURE events are sent as a result of GrCopyArea using the specified graphics context.</em> <a href="#a5"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a6">GrClearArea</a> (GR_WINDOW_ID wid, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height, GR_BOOL exposeflag)</td></tr><tr><td> </td><td><em class="mdesc">Clears the specified window by to its background color or pixmap.</em> <a href="#a6"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a7">GrSetGCForeground</a> (GR_GC_ID gc, GR_COLOR foreground)</td></tr><tr><td> </td><td><em class="mdesc">Changes the foreground colour of the specified graphics context to the specified RGB colour.</em> <a href="#a7"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a8">GrSetGCBackground</a> (GR_GC_ID gc, GR_COLOR background)</td></tr><tr><td> </td><td><em class="mdesc">Changes the background colour of the specified graphics context to the specified RGB colour.</em> <a href="#a8"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a9">GrSetGCForegroundPixelVal</a> (GR_GC_ID gc, GR_PIXELVAL foreground)</td></tr><tr><td> </td><td><em class="mdesc">Changes the foreground colour of the specified graphics context to the specified hardware pixel value.</em> <a href="#a9"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a10">GrSetGCBackgroundPixelVal</a> (GR_GC_ID gc, GR_PIXELVAL background)</td></tr><tr><td> </td><td><em class="mdesc">Changes the background colour of the specified graphics context to the specified hardware pixel value.</em> <a href="#a10"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a11">GrSetGCMode</a> (GR_GC_ID gc, int mode)</td></tr><tr><td> </td><td><em class="mdesc">Changes the drawing mode (SET, XOR, OR, AND, etc.) of the specified graphics context to the specified mode.</em> <a href="#a11"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a12">GrSetGCLineAttributes</a> (GR_GC_ID, int)</td></tr><tr><td> </td><td><em class="mdesc">Changes the line style to either SOLID or ON OFF DASHED.</em> <a href="#a12"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a13">GrSetGCDash</a> (GR_GC_ID, char *, int)</td></tr><tr><td> </td><td><em class="mdesc">FIXME.</em> <a href="#a13"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a14">GrSetGCFillMode</a> (GR_GC_ID, int)</td></tr><tr><td> </td><td><em class="mdesc">FIXME.</em> <a href="#a14"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a15">GrSetGCStipple</a> (GR_GC_ID gc, GR_BITMAP *bitmap, int width, int height)</td></tr><tr><td> </td><td><em class="mdesc">FIXME.</em> <a href="#a15"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a16">GrSetGCTile</a> (GR_GC_ID gc, GR_WINDOW_ID pixmap, int width, int height)</td></tr><tr><td> </td><td><em class="mdesc">FIXME.</em> <a href="#a16"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a17">GrSetGCTSOffset</a> (GR_GC_ID gc, int xoff, int yoff)</td></tr><tr><td> </td><td><em class="mdesc">FIXME.</em> <a href="#a17"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a18">GrSetGCUseBackground</a> (GR_GC_ID gc, GR_BOOL flag)</td></tr><tr><td> </td><td><em class="mdesc">Sets the flag which chooses whether or not the background colour is used when drawing bitmaps and text using the specified graphics context to the specified value.</em> <a href="#a18"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a19">GrLine</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x1, GR_COORD y1, GR_COORD x2, GR_COORD y2)</td></tr><tr><td> </td><td><em class="mdesc">Draws a line using the specified graphics context on the specified drawable from (x1, y1) to (x2, y2), with coordinates given relative to the drawable.</em> <a href="#a19"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a20">GrRect</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height)</td></tr><tr><td> </td><td><em class="mdesc">Draw the boundary of a rectangle of the specified dimensions and position on the specified drawable using the specified graphics context.</em> <a href="#a20"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a21">GrFillRect</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height)</td></tr><tr><td> </td><td><em class="mdesc">Draw a filled rectangle of the specified dimensions and position on the specified drawable using the specified graphics context.</em> <a href="#a21"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a22">GrEllipse</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE rx, GR_SIZE ry)</td></tr><tr><td> </td><td><em class="mdesc">Draws the boundary of ellipse at the specified position using the specified dimensions and graphics context on the specified drawable.</em> <a href="#a22"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a23">GrFillEllipse</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE rx, GR_SIZE ry)</td></tr><tr><td> </td><td><em class="mdesc">Draws a filled ellipse at the specified position using the specified dimensions and graphics context on the specified drawable.</em> <a href="#a23"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a24">GrArc</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE rx, GR_SIZE ry, GR_COORD ax, GR_COORD ay, GR_COORD bx, GR_COORD by, int type)</td></tr><tr><td> </td><td><em class="mdesc">Draws an arc with the specified dimensions at the specified position on the specified drawable using the specified graphics context.</em> <a href="#a24"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a25">GrArcAngle</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE rx, GR_SIZE ry, GR_COORD angle1, GR_COORD angle2, int type)</td></tr><tr><td> </td><td><em class="mdesc">Draws an arc with the specified dimensions at the specified position on the specified drawable using the specified graphics context.</em> <a href="#a25"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a26">GrBitmap</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height, GR_BITMAP *imagebits)</td></tr><tr><td> </td><td><em class="mdesc">Draws the monochrome bitmap data provided in the imagebits argument at the specified position on the specified drawable using the specified graphics context.</em> <a href="#a26"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a27">GrDrawImageBits</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_IMAGE_HDR *pimage)</td></tr><tr><td> </td><td><em class="mdesc">Draws the image contained in the specified image structure onto the specified drawable at the specified coordinates using the specified graphics context.</em> <a href="#a27"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a28">GrArea</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height, void *pixels, int pixtype)</td></tr><tr><td> </td><td><em class="mdesc">Draws the specified pixel array of the specified size and format onto the specified drawable using the specified graphics context at the specified position.</em> <a href="#a28"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a29">GrCopyArea</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height, GR_DRAW_ID srcid, GR_COORD srcx, GR_COORD srcy, unsigned long op)</td></tr><tr><td> </td><td><em class="mdesc">Copies the specified area of the specified size between the specified drawables at the specified positions using the specified graphics context and ROP codes.</em> <a href="#a29"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a30">GrReadArea</a> (GR_DRAW_ID id, GR_COORD x, GR_COORD y, GR_SIZE width, GR_SIZE height, GR_PIXELVAL *pixels)</td></tr><tr><td> </td><td><em class="mdesc">Reads the pixel data of the specified size from the specified position on the specified drawable into the specified pixel array.</em> <a href="#a30"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a31">GrPoint</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COORD x, GR_COORD y)</td></tr><tr><td> </td><td><em class="mdesc">Draws a point using the specified graphics context at the specified position on the specified drawable.</em> <a href="#a31"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a32">GrPoints</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COUNT count, GR_POINT *pointtable)</td></tr><tr><td> </td><td><em class="mdesc">Draws a set of points using the specified graphics context at the positions specified by the point table on the specified drawable.</em> <a href="#a32"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a33">GrPoly</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COUNT count, GR_POINT *pointtable)</td></tr><tr><td> </td><td><em class="mdesc">Draws an unfilled polygon on the specified drawable using the specified graphics context.</em> <a href="#a33"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a34">GrFillPoly</a> (GR_DRAW_ID id, GR_GC_ID gc, GR_COUNT count, GR_POINT *pointtable)</td></tr><tr><td> </td><td><em class="mdesc">Draws a filled polygon on the specified drawable using the specified graphics context.</em> <a href="#a34"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__draw.html#a35">GrStretchArea</a> (GR_DRAW_ID dstid, GR_GC_ID gc, GR_COORD dx1, GR_COORD dy1, GR_COORD dx2, GR_COORD dy2, GR_DRAW_ID srcid, GR_COORD sx1, GR_COORD sy1, GR_COORD sx2, GR_COORD sy2, unsigned long op)</td></tr><tr><td> </td><td><em class="mdesc">Copies a region from one drawable to another.</em> <a href="#a35"></a><em></em><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions for actually drawing primitive shapes on the screen.<p><hr><h2>Function Documentation</h2><a name="a24" doxytag="nano-X.h::GrArc"></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 GrArc </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_DRAW_ID </td> <td class="mdname" nowrap> <em>id</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_GC_ID </td> <td class="mdname" nowrap> <em>gc</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>y</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_SIZE </td> <td class="mdname" nowrap> <em>rx</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_SIZE </td> <td class="mdname" nowrap> <em>ry</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>ax</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>ay</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>bx</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>by</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>type</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Draws an arc with the specified dimensions at the specified position on the specified drawable using the specified graphics context.<p>The type specifies the fill type. Possible values include GR_ARC and GR_PIE.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>id</em> </td><td>the ID of the drawable to draw the arc on </td></tr> <tr><td valign=top><em>gc</em> </td><td>the graphics context to use when drawing the arc </td></tr> <tr><td valign=top><em>x</em> </td><td>the X coordinate to draw the arc at relative to the drawable </td></tr> <tr><td valign=top><em>y</em> </td><td>the Y coordinate to draw the arc at relative to the drawable </td></tr> <tr><td valign=top><em>rx</em> </td><td>the radius of the arc on the X axis </td></tr> <tr><td valign=top><em>ry</em> </td><td>the radius of the arc on the Y axis </td></tr> <tr><td valign=top><em>ax</em> </td><td>the X coordinate of the start of the arc relative to the drawable </td></tr> <tr><td valign=top><em>ay</em> </td><td>the Y coordinate of the start of the arc relative to the drawable </td></tr> <tr><td valign=top><em>bx</em> </td><td>the X coordinate of the end of the arc relative to the drawable </td></tr> <tr><td valign=top><em>by</em> </td><td>the Y coordinate of the end of the arc relative to the drawable </td></tr> <tr><td valign=top><em>type</em> </td><td>the fill style to use when drawing the arc </td></tr> </table></dl> </td> </tr></table><a name="a25" doxytag="nano-X.h::GrArcAngle"></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 GrArcAngle </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_DRAW_ID </td> <td class="mdname" nowrap> <em>id</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_GC_ID </td> <td class="mdname" nowrap> <em>gc</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>y</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_SIZE </td> <td class="mdname" nowrap> <em>rx</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_SIZE </td> <td class="mdname" nowrap> <em>ry</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>angle1</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>angle2</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>type</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Draws an arc with the specified dimensions at the specified position on the specified drawable using the specified graphics context.<p>The type specifies the fill type. Possible values include GR_ARC and GR_PIE. This function requires floating point support, and is slightly slower than the <a class="el" href="group__nanox__draw.html#a24">GrArc()</a> function which does not require floating point.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>id</em> </td><td>the ID of the drawable to draw the arc on </td></tr> <tr><td valign=top><em>gc</em> </td><td>the graphics context to use when drawing the arc </td></tr> <tr><td valign=top><em>x</em> </td><td>the X coordinate to draw the arc at relative to the drawable </td></tr> <tr><td valign=top><em>y</em> </td><td>the Y coordinate to draw the arc at relative to the drawable </td></tr> <tr><td valign=top><em>rx</em> </td><td>the radius of the arc on the X axis </td></tr> <tr><td valign=top><em>ry</em> </td><td>the radius of the arc on the Y axis </td></tr> <tr><td valign=top><em>angle1</em> </td><td>the angle of the start of the arc </td></tr> <tr><td valign=top><em>angle2</em> </td><td>the angle of the end of the arc </td></tr> <tr><td valign=top><em>type</em> </td><td>the fill style to use when drawing the arc </td></tr> </table></dl> </td> </tr></table><a name="a28" doxytag="nano-X.h::GrArea"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -