blob: 5212f2afe4f6d01ecf34e8fb4a7c6fd0892accb0 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Skia: SkDrawLooper Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>SkDrawLooper Class Reference</h1><!-- doxytag: class="SkDrawLooper" --><!-- doxytag: inherits="SkFlattenable" -->
<p><code>#include &lt;<a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>&gt;</code></p>
<p>Inherits <a class="el" href="class_sk_flattenable.html">SkFlattenable</a>.</p>
<p>Inherited by <a class="el" href="class_sk_blur_draw_looper.html">SkBlurDrawLooper</a>, and <a class="el" href="class_sk_layer_draw_looper.html">SkLayerDrawLooper</a>.</p>
<div class="dynheader">
Collaboration diagram for SkDrawLooper:</div>
<div class="dynsection">
<div class="center"><img src="class_sk_draw_looper__coll__graph.png" border="0" usemap="#_sk_draw_looper_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="class_sk_draw_looper-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_draw_looper.html#a57d34011f50699c148ac10a5908ff32c">init</a> (<a class="el" href="class_sk_canvas.html">SkCanvas</a> *, <a class="el" href="class_sk_paint.html">SkPaint</a> *)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_draw_looper.html#a8c11c07bf9388798bdbcd50640b176ae">next</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_draw_looper.html#a7314f0e11b43b61870c269730e83a577">restore</a> ()</td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_draw_looper.html#af9d595814c879da5a309873f966066e8">SkDrawLooper</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_draw_looper.html#af9601f5ba4ba2fe6ada11350e07fb7a2">SkDrawLooper</a> (<a class="el" href="class_sk_flattenable_read_buffer.html">SkFlattenableReadBuffer</a> &amp;buffer)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Subclasses of <a class="el" href="class_sk_draw_looper.html">SkDrawLooper</a> can be attached to a <a class="el" href="class_sk_paint.html">SkPaint</a>. Where they are, and something is drawn to a canvas with that paint, the looper subclass will be called, allowing it to modify the canvas and/or paint for that draw call. More than that, via the <a class="el" href="class_sk_draw_looper.html#a8c11c07bf9388798bdbcd50640b176ae">next()</a> method, the looper can modify the draw to be invoked multiple times (hence the name loop-er), allow it to perform effects like shadows or frame/fills, that require more than one pass. </p>
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00035">35</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af9d595814c879da5a309873f966066e8"></a><!-- doxytag: member="SkDrawLooper::SkDrawLooper" ref="af9d595814c879da5a309873f966066e8" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SkDrawLooper::SkDrawLooper </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00057">57</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
</div>
</div>
<a class="anchor" id="af9601f5ba4ba2fe6ada11350e07fb7a2"></a><!-- doxytag: member="SkDrawLooper::SkDrawLooper" ref="af9601f5ba4ba2fe6ada11350e07fb7a2" args="(SkFlattenableReadBuffer &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SkDrawLooper::SkDrawLooper </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_sk_flattenable_read_buffer.html">SkFlattenableReadBuffer</a> &amp;&nbsp;</td>
<td class="paramname"> <em>buffer</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00058">58</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a57d34011f50699c148ac10a5908ff32c"></a><!-- doxytag: member="SkDrawLooper::init" ref="a57d34011f50699c148ac10a5908ff32c" args="(SkCanvas *, SkPaint *)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void SkDrawLooper::init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_sk_canvas.html">SkCanvas</a> *&nbsp;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_sk_paint.html">SkPaint</a> *&nbsp;</td>
<td class="paramname"></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called right before something is being drawn to the specified canvas with the specified paint. Subclass that want to modify either parameter can do so now. </p>
<p>Reimplemented in <a class="el" href="class_sk_blur_draw_looper.html#a146047a4afee4e864acfeda76dbf8b7c">SkBlurDrawLooper</a>, and <a class="el" href="class_sk_layer_draw_looper.html#aec8345a7005abb30ee33c207db41ba7b">SkLayerDrawLooper</a>.</p>
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00041">41</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8c11c07bf9388798bdbcd50640b176ae"></a><!-- doxytag: member="SkDrawLooper::next" ref="a8c11c07bf9388798bdbcd50640b176ae" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool SkDrawLooper::next </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called in a loop (after <a class="el" href="class_sk_draw_looper.html#a57d34011f50699c148ac10a5908ff32c">init()</a>). Each time true is returned, the object is drawn (possibly with a modified canvas and/or paint). When false is finally returned, drawing for the object stops. </p>
<p>Reimplemented in <a class="el" href="class_sk_blur_draw_looper.html#a8153c143dcbdf0c34b311ad59eb7a9d0">SkBlurDrawLooper</a>, and <a class="el" href="class_sk_layer_draw_looper.html#a8e74d44df169d00ebb53ba0c4a85abcb">SkLayerDrawLooper</a>.</p>
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00046">46</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7314f0e11b43b61870c269730e83a577"></a><!-- doxytag: member="SkDrawLooper::restore" ref="a7314f0e11b43b61870c269730e83a577" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void SkDrawLooper::restore </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Called after the looper has finally returned false from <a class="el" href="class_sk_draw_looper.html#a8c11c07bf9388798bdbcd50640b176ae">next()</a>, allowing the looper to restore the canvas/paint to their original states. is this required, since the subclass knows when it is done??? should we pass the canvas/paint here, and/or to the next call so that subclasses don't need to retain pointers to them during the loop? </p>
<p>Reimplemented in <a class="el" href="class_sk_blur_draw_looper.html#a1f6c5b8d3c4b01d1804cb1de8f24b9ad">SkBlurDrawLooper</a>, and <a class="el" href="class_sk_layer_draw_looper.html#ac289725c7c27cfa5b3b062d93719abef">SkLayerDrawLooper</a>.</p>
<p>Definition at line <a class="el" href="_sk_draw_looper_8h_source.html#l00054">54</a> of file <a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/core/<a class="el" href="_sk_draw_looper_8h_source.html">SkDrawLooper.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Oct 20 11:03:42 2009 for Skia by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>