<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>deprecated replacements</title>
		<link>http://www.allegro.cc/forums/view/591407</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 16 May 2007 03:44:18 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello,<br />This seems as good a place as any. I&#39;m compiling some code and it uses a function that allegro spits back as being &#39;deprecated&#39;. What&#39;s the chances of, in the manual, to state what functions replace the deprecated ones?</p><p>Anyway, back to my main question. The deprecated function I have is set_clip(...), is this now replaced by set_clip_rect(...) and are the parameters the same, e.g. x,y,width,height instead of x1,y1,x2,y2, etc.?</p><p>Is there anything special with set_clip (thebitmap, 0, 0, 0, 0);</p><p>As in, what&#39;s with the zero values? the manual says use -1 to disable drawing, unless that&#39;s something else?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 16 May 2007 02:56:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>set_clip was turned into set_clip_state and set_clip_rect.</p><p><span class="source-code">set_clip<span class="k2">(</span>bmp, <span class="n">0</span>,<span class="n">0</span>, <span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span></span></p><p>Is the same as:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_clip_rect" target="_blank"><span class="a">set_clip_rect</span></a><span class="k2">(</span>bitmap, <span class="n">0</span>, <span class="n">0</span>, bitmap-&gt;w-1, bitmap-&gt;h-1<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/set_clip_state" target="_blank"><span class="a">set_clip_state</span></a><span class="k2">(</span>bitmap, FALSE<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Clipping is now disabled, and you can draw anywhere (including out of bounds).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As in, what&#39;s with the zero values? the manual says use -1 to disable drawing, unless that&#39;s something else?
</p></div></div><p>
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_clip_rect" target="_blank"><span class="a">set_clip_rect</span></a><span class="k2">(</span>bitmap, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// you can draw on pixel 0,0</span>

<a href="http://www.allegro.cc/manual/set_clip_rect" target="_blank"><span class="a">set_clip_rect</span></a><span class="k2">(</span>bitmap, <span class="n">0</span>, <span class="n">0</span>, <span class="k3">-</span><span class="n">1</span>, <span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// you cannot draw anywhere</span>
</pre></div></div><p>

In both of the above cases, clipping is still enabled.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 16 May 2007 03:08:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I take it set_clip with four zero&#39;s was a special case?</p><p>I think I&#39;d better update my local allegro manual just to make sure <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 16 May 2007 03:16:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I take it set_clip with four zero&#39;s was a special case?
</p></div></div><p>
Any other numbers are equivalent to:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_clip_rect" target="_blank"><span class="a">set_clip_rect</span></a><span class="k2">(</span>bitmap, x1, y1, x2, y2<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/set_clip_state" target="_blank"><span class="a">set_clip_state</span></a><span class="k2">(</span>bitmap, TRUE<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
after making sure that x1 &lt;= x2 and y1 &lt;= y2.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 16 May 2007 03:34:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Replacements for deprecated functions are listed on this page: <a href="http://alleg.sourceforge.net/stabledocs/en/api.html">http://alleg.sourceforge.net/stabledocs/en/api.html</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Wed, 16 May 2007 03:44:18 +0000</pubDate>
	</item>
</rss>
