dlangui/docs/gldrawbuf.html

134 lines
4.3 KiB
HTML

<html><head>
<META http-equiv="content-type" content="text/html; charset=utf-8">
<title>dlangui.graphics.gldrawbuf</title>
</head><body>
<h1>dlangui.graphics.gldrawbuf</h1>
<!-- Generated by Ddoc from src/dlangui/graphics/gldrawbuf.d -->
DLANGUI library.
<br><br>
This module contains opengl based drawing buffer implementation.
<br><br>
To enable OpenGL support, build with version(USE_OPENGL);
<br><br>
<b>Synopsis:</b><br>
<pre class="d_code"><font color=blue>import</font> dlangui.graphics.<u>gldrawbuf</u>;
</pre>
<br><br>
<b>License:</b><br>
Boost License 1.0
<br><br>
<b>Authors:</b><br>
Vadim Lopatin, coolreader.org@gmail.com<br><br>
<dl><dt><big><a name="GLDrawBuf"></a>class <u>GLDrawBuf</u>: dlangui.graphics.drawbuf.DrawBuf;
</big></dt>
<dd>drawing buffer - image container which allows to perform some drawing operations<br><br>
<dl><dt><big><a name="GLDrawBuf.scene"></a>@property Scene <u>scene</u>();
</big></dt>
<dd>get current <u>scene</u> (exists only between beforeDrawing() and afterDrawing() calls)<br><br>
</dd>
<dt><big><a name="GLDrawBuf.width"></a>@property int <u>width</u>();
</big></dt>
<dd>returns current <u>width</u><br><br>
</dd>
<dt><big><a name="GLDrawBuf.height"></a>@property int <u>height</u>();
</big></dt>
<dd>returns current <u>height</u><br><br>
</dd>
<dt><big><a name="GLDrawBuf.beforeDrawing"></a>void <u>beforeDrawing</u>();
</big></dt>
<dd>reserved for hardware-accelerated drawing - begins drawing batch<br><br>
</dd>
<dt><big><a name="GLDrawBuf.afterDrawing"></a>void <u>afterDrawing</u>();
</big></dt>
<dd>reserved for hardware-accelerated drawing - ends drawing batch<br><br>
</dd>
<dt><big><a name="GLDrawBuf.resize"></a>void <u>resize</u>(int <i>width</i>, int <i>height</i>);
</big></dt>
<dd><u>resize</u> buffer<br><br>
</dd>
<dt><big><a name="GLDrawBuf.fill"></a>void <u>fill</u>(uint <i>color</i>);
</big></dt>
<dd><u>fill</u> the whole buffer with solid <i>color</i> (no clipping applied)<br><br>
</dd>
<dt><big><a name="GLDrawBuf.fillRect"></a>void <u>fillRect</u>(Rect <i>rc</i>, uint <i>color</i>);
</big></dt>
<dd>fill rectangle with solid <i>color</i> (clipping is applied)<br><br>
</dd>
<dt><big><a name="GLDrawBuf.drawGlyph"></a>void <u>drawGlyph</u>(int <i>x</i>, int <i>y</i>, Glyph* <i>glyph</i>, uint <i>color</i>);
</big></dt>
<dd>draw 8bit alpha image - usually font <i>glyph</i> using specified <i>color</i> (clipping is applied)<br><br>
</dd>
<dt><big><a name="GLDrawBuf.drawFragment"></a>void <u>drawFragment</u>(int <i>x</i>, int <i>y</i>, DrawBuf <i>src</i>, Rect <i>srcrect</i>);
</big></dt>
<dd>draw source buffer rectangle contents to destination buffer<br><br>
</dd>
<dt><big><a name="GLDrawBuf.drawRescaled"></a>void <u>drawRescaled</u>(Rect <i>dstrect</i>, DrawBuf <i>src</i>, Rect <i>srcrect</i>);
</big></dt>
<dd>draw source buffer rectangle contents to destination buffer rectangle applying rescaling<br><br>
</dd>
<dt><big><a name="GLDrawBuf.clear"></a>void <u>clear</u>();
</big></dt>
<dd>cleanup resources<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="SceneItem"></a>abstract class <u>SceneItem</u>;
</big></dt>
<dd>base class for all drawing scene items.<br><br>
</dd>
<dt><big><a name="Scene"></a>class <u>Scene</u>;
</big></dt>
<dd>Drawing scene (operations sheduled for drawing)<br><br>
<dl><dt><big><a name="Scene.add"></a>void <u>add</u>(SceneItem <i>item</i>);
</big></dt>
<dd><u>add</u> new scene <i>item</i> to scene<br><br>
</dd>
<dt><big><a name="Scene.draw"></a>void <u>draw</u>();
</big></dt>
<dd>draws all scene items and removes them from list<br><br>
</dd>
<dt><big><a name="Scene.reset"></a>void <u>reset</u>();
</big></dt>
<dd>resets scene for new drawing - deletes all items<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="onObjectDestroyedCallback"></a>void <u>onObjectDestroyedCallback</u>(uint <i>pobject</i>);
</big></dt>
<dd>object deletion listener callback function type<br><br>
</dd>
<dt><big><a name="onGlyphDestroyedCallback"></a>void <u>onGlyphDestroyedCallback</u>(uint <i>pobject</i>);
</big></dt>
<dd>object deletion listener callback function type<br><br>
</dd>
</dl>
<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. Vadim Lopatin, 2014
</small>
</body></html>