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

📄 classwgui_1_1cpainter.html

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>wGui::CPainter class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</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; </center><hr><h1>wGui::CPainter Class Reference</h1>Painter objects take care of all the actual drawing functions needed to draw to an SDL surface. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="wg__painter_8h-source.html">wg_painter.h</a>&gt;</code><p><h2>Public Types</h2><ul><li>enum <a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a> { <br>&nbsp;&nbsp;<a class="el" href="classwGui_1_1CPainter.html#s6s0">PAINT_IGNORE</a> =  0, <a class="el" href="classwGui_1_1CPainter.html#s6s1">PAINT_REPLACE</a>, <a class="el" href="classwGui_1_1CPainter.html#s6s2">PAINT_NORMAL</a>, <a class="el" href="classwGui_1_1CPainter.html#s6s3">PAINT_OR</a>, <br>&nbsp;&nbsp;<a class="el" href="classwGui_1_1CPainter.html#s6s4">PAINT_AND</a>, <a class="el" href="classwGui_1_1CPainter.html#s6s5">PAINT_XOR</a><br> }</ul><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CPainter.html#a0">CPainter</a> (SDL_Surface *pSurface, <a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a> ePaintMode=PAINT_NORMAL)<li><a class="el" href="classwGui_1_1CPainter.html#a1">CPainter</a> (<a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *pWindow, <a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a> ePaintMode=PAINT_NORMAL)<li><a name="a2" doxytag="wGui::CPainter::~CPainter"></a>virtual <a class="el" href="classwGui_1_1CPainter.html#a2">~CPainter</a> (void)<dl class="el"><dd><font size=-1><em>Standard deconstructor.<br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CPainter.html#a3">DrawHLine</a> (int xStart, int xEnd, int y, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;LineColor=DEFAULT_LINE_COLOR)<li>void <a class="el" href="classwGui_1_1CPainter.html#a4">DrawVLine</a> (int yStart, int yEnd, int x, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;LineColor=DEFAULT_LINE_COLOR)<li>void <a class="el" href="classwGui_1_1CPainter.html#a5">DrawRect</a> (const <a class="el" href="classwGui_1_1CRect.html">CRect</a> &amp;Rect, bool bFilled, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;BorderColor=DEFAULT_LINE_COLOR, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;FillColor=DEFAULT_FG_COLOR)<li>void <a class="el" href="classwGui_1_1CPainter.html#a6">DrawLine</a> (const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &amp;StartPoint, const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &amp;EndPoint, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;LineColor=DEFAULT_LINE_COLOR)<li>void <a class="el" href="classwGui_1_1CPainter.html#a7">DrawPoint</a> (const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &amp;Point, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;PointColor=DEFAULT_LINE_COLOR)<li><a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="el" href="classwGui_1_1CPainter.html#a8">ReadPoint</a> (const <a class="el" href="classwGui_1_1CPoint.html">CPoint</a> &amp;Point)<li>void <a class="el" href="classwGui_1_1CPainter.html#a9">ReplaceColor</a> (const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;NewColor, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;OldColor)<li>void <a class="el" href="classwGui_1_1CPainter.html#a10">TransparentColor</a> (const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;TransparentColor)</ul><h2>Protected Methods</h2><ul><li><a name="b0" doxytag="wGui::CPainter::LockSurface"></a>void <a class="el" href="classwGui_1_1CPainter.html#b0">LockSurface</a> (void)<dl class="el"><dd><font size=-1><em>Locks the SDL surface.<br><br></em></font></dl><li><a name="b1" doxytag="wGui::CPainter::UnlockSurface"></a>void <a class="el" href="classwGui_1_1CPainter.html#b1">UnlockSurface</a> (void)<dl class="el"><dd><font size=-1><em>Unlocks the SDL surface.<br><br></em></font></dl><li><a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="el" href="classwGui_1_1CPainter.html#b2">MixColor</a> (const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;ColorBase, const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;ColorAdd)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CPainter::m_pSurface"></a>SDL_Surface * <a class="el" href="classwGui_1_1CPainter.html#n0">m_pSurface</a><dl class="el"><dd><font size=-1><em>A pointer to the SDL Surface to draw on.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CPainter::m_pWindow"></a><a class="el" href="classwGui_1_1CWindow.html">CWindow</a> * <a class="el" href="classwGui_1_1CPainter.html#n1">m_pWindow</a><dl class="el"><dd><font size=-1><em>A pointer to the <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> to draw to.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CPainter::m_PaintMode"></a><a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a> <a class="el" href="classwGui_1_1CPainter.html#n2">m_PaintMode</a><dl class="el"><dd><font size=-1><em>The painting mode to use.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Painter objects take care of all the actual drawing functions needed to draw to an SDL surface.<p><p>Definition at line <a class="el" href="wg__painter_8h-source.html#l00040">40</a> of file <a class="el" href="wg__painter_8h-source.html">wg_painter.h</a>.<hr><h2>Member Enumeration Documentation</h2><a name="s6" doxytag="wGui::CPainter::EPaintMode"></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"> enum wGui::CPainter::EPaintMode      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>A mode for painting the surface can be specified currently this does not work for the DrawHLine, DrawVLine, or DrawRect methods <dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="s6s0" doxytag="PAINT_IGNORE"></a><em>PAINT_IGNORE</em></em>&nbsp;</td><td>Don't actually draw anything.</td></tr><tr><td valign=top><em><a name="s6s1" doxytag="PAINT_REPLACE"></a><em>PAINT_REPLACE</em></em>&nbsp;</td><td>Replace the pixel with the new pixel.</td></tr><tr><td valign=top><em><a name="s6s2" doxytag="PAINT_NORMAL"></a><em>PAINT_NORMAL</em></em>&nbsp;</td><td>Do normal color mixing (uses the alpha channel).</td></tr><tr><td valign=top><em><a name="s6s3" doxytag="PAINT_OR"></a><em>PAINT_OR</em></em>&nbsp;</td><td>OR the new color in.</td></tr><tr><td valign=top><em><a name="s6s4" doxytag="PAINT_AND"></a><em>PAINT_AND</em></em>&nbsp;</td><td>AND the new color in.</td></tr><tr><td valign=top><em><a name="s6s5" doxytag="PAINT_XOR"></a><em>PAINT_XOR</em></em>&nbsp;</td><td>XOR the new color in.</td></tr></table></dl><p>Definition at line <a class="el" href="wg__painter_8h-source.html#l00045">45</a> of file <a class="el" href="wg__painter_8h-source.html">wg_painter.h</a>.    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="wGui::CPainter::CPainter"></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"> wGui::CPainter::CPainter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">SDL_Surface *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pSurface</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>ePaintMode</em> = PAINT_NORMAL</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>Construct a new Painter object <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pSurface</em>&nbsp;</td><td>A pointer to the SDL surface to draw to </td></tr><tr><td valign=top><em>ePaintMode</em>&nbsp;</td><td>The painting mode to use, defaults to PAINT_NORMAL </td></tr></table></dl><p>Definition at line <a class="el" href="wg__painter_8cpp-source.html#l00037">37</a> of file <a class="el" href="wg__painter_8cpp-source.html">wg_painter.cpp</a>.<p>References <a class="el" href="wg__painter_8h-source.html#l00129">m_pSurface</a>.    </td>  </tr></table><a name="a1" doxytag="wGui::CPainter::CPainter"></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"> wGui::CPainter::CPainter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classwGui_1_1CWindow.html">CWindow</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pWindow</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classwGui_1_1CPainter.html#s6">EPaintMode</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>ePaintMode</em> = PAINT_NORMAL</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>Construct a new Painter object <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pWindow</em>&nbsp;</td><td>A pointer to the <a class="el" href="classwGui_1_1CWindow.html">CWindow</a> to draw to, this will only allow drawing to the window's client area </td></tr><tr><td valign=top><em>ePaintMode</em>&nbsp;</td><td>The painting mode to use, defaults to PAINT_NORMAL </td></tr></table></dl><p>Definition at line <a class="el" href="wg__painter_8cpp-source.html#l00049">49</a> of file <a class="el" href="wg__painter_8cpp-source.html">wg_painter.cpp</a>.<p>References <a class="el" href="wg__window_8h-source.html#l00107">wGui::CWindow::GetSDLSurface()</a>, <a class="el" href="wg__painter_8h-source.html#l00129">m_pSurface</a>, and <a class="el" href="wg__painter_8h-source.html#l00130">m_pWindow</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a3" doxytag="wGui::CPainter::DrawHLine"></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 wGui::CPainter::DrawHLine </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>xStart</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>xEnd</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>y</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>LineColor</em> = DEFAULT_LINE_COLOR</td>        </tr>        <tr>          <td></td>

⌨️ 快捷键说明

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