<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>BITMAP Border</title>
		<link>http://www.allegro.cc/forums/view/560025</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 20 Jan 2006 03:50:59 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I haven&#39;t actually written any code, but the idea is in my head and I though I&#39;d share to get some general feedback.  What I want to do is make function like the following:</p><p>void draw_border(BITMAP *bImage, BITMAP *bBorder);</p><p>This function will draw the bBorder image around the bImage.  For example, if this were bBorder:</p><p>http://comp.uark.edu/~spsilve/border.JPG</p><p>And this were bImage:</p><p>http://comp.uark.edu/~spsilve/image.JPG</p><p>Then this should be the final output:</p><p>http://comp.uark.edu/~spsilve/final.JPG</p><p>The purpose of draw_border is to draw a border on what&#39;s actually seen.  The image above is just a big square, so no problem there.  If I were to have a circle, however, that would be a different situation.  The border should follow the edges of the circle or polygon or whatever shape it is.  Following the edges isn&#39;t really that difficult of a question, but what I&#39;ve been wondering about is the corners.  Notice above the border image turns with the picture.  I&#39;ve thought of a few different methods that might work, but I&#39;m curious as to what you think.  </p><p>My favorite method so far consists of stripping the border image and drawing pieces of it at a time.  Like taking the top one-pixel line of the image and drawing that around the entire space and then go to the next part of the border.  Since this is going to be a one-time process in the actual program, it&#39;s okay if it takes a little time.</p><p>Also note that above I used a very simple border.  I could use something like a smile face and get some weird results.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 17 Jan 2006 04:40:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
I think this is more difficult than it seems if it can follow polygons and curves while keeping the pattern..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Tue, 17 Jan 2006 04:51:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thought it&#39;d be a nice thing for my gui.  If it&#39;s too complicated, I&#39;ll probably just throw it out.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 17 Jan 2006 11:52:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><i>Nevermind, I missunderstand question...</i>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hrvoje Ban)</author>
		<pubDate>Tue, 17 Jan 2006 13:09:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I think this is more difficult than it seems if it can follow polygons and curves while keeping the pattern..
</p></div></div><p>

That could be simplified by adding the restriction of a one-pixel-width border image, so there&#39;d be no &quot;real&quot; pattern to keep.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Indeterminatus)</author>
		<pubDate>Tue, 17 Jan 2006 13:23:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Exactly right, Indeterminatus.<br />You also couldn&#39;t have very dramatic curves in your circle or polygon =/<br />Otherwise you&#39;ll get reaaaally werid looking borders
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Tue, 17 Jan 2006 14:05:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I guess a generalized approach would be:<br />1) Vectorize the shape into a polygon.<br />2) For each edge, create a parallel line.<br />3) Find the intersection points of two adjacent parallels.<br />4) You have now vectorized the outline; render it as quads, with appropriate texture coords (s as running variable, increment by edge length per vertex; t as 0 on the original outline and as 1 on the shifted one).</p><p>The math involved in step 3 can be a bit tricky though, and you cannot use arbitrary shapes with arbitrary borders.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Tue, 17 Jan 2006 17:09:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>a simple way:</p><p>use only one line of pixel gradient,</p><p>and (pseudo code):</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">int</span> it<span class="k2">;</span> <span class="c">/* should i say that's just an ... iterator ? */</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td><span class="c">/* admitting that your border is 20 pixel width */</span></td></tr><tr><td class="number">4</td><td><span class="k1">int</span> gradline<span class="k2">[</span><span class="n">20</span><span class="k2">]</span><span class="k2">;</span></td></tr><tr><td class="number">5</td><td>&#160;</td></tr><tr><td class="number">6</td><td><span class="c">/* fill it here with the color of your choice , i'm just making an example*/</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td><span class="k1">for</span><span class="k2">(</span> it <span class="k3">=</span> <span class="n">0</span> <span class="k2">;</span> it <span class="k3">&lt;</span> <span class="n">5</span> , it <span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span></td></tr><tr><td class="number">9</td><td>gradline<span class="k2">[</span>it<span class="k2">]</span> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span> <span class="n">100</span> , <span class="n">0</span> , <span class="n">0</span> <span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">10</td><td>&#160;</td></tr><tr><td class="number">11</td><td><span class="k1">for</span><span class="k2">(</span> it <span class="k3">=</span> <span class="n">5</span> <span class="k2">;</span> it <span class="k3">&lt;</span> <span class="n">10</span> , it <span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span></td></tr><tr><td class="number">12</td><td>gradline<span class="k2">[</span>it<span class="k2">]</span> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span> <span class="n">150</span> , <span class="n">0</span> , <span class="n">0</span> <span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>&#160;</td></tr><tr><td class="number">14</td><td><span class="k1">for</span><span class="k2">(</span> it <span class="k3">=</span> <span class="n">10</span> <span class="k2">;</span> it <span class="k3">&lt;</span> <span class="n">15</span> , it <span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span></td></tr><tr><td class="number">15</td><td>gradline<span class="k2">[</span>it<span class="k2">]</span> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span> <span class="n">200</span> , <span class="n">0</span> , <span class="n">0</span> <span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>&#160;</td></tr><tr><td class="number">17</td><td><span class="k1">for</span><span class="k2">(</span> it <span class="k3">=</span> <span class="n">15</span> <span class="k2">;</span> it <span class="k3">&lt;</span> <span class="n">20</span> , it <span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span></td></tr><tr><td class="number">18</td><td>gradline<span class="k2">[</span>it<span class="k2">]</span> <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span> <span class="n">255</span> , <span class="n">0</span> , <span class="n">0</span> <span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>&#160;</td></tr><tr><td class="number">20</td><td>&#160;</td></tr><tr><td class="number">21</td><td><span class="c">/* draw each border */</span></td></tr><tr><td class="number">22</td><td> </td></tr><tr><td class="number">23</td><td><span class="k1">for</span><span class="k2">(</span> it <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> it <span class="k3">&lt;</span> <span class="n">20</span> <span class="k2">;</span> it <span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span></td></tr><tr><td class="number">24</td><td><a href="http://www.allegro.cc/manual/rect" target="_blank"><span class="a">rect</span></a><span class="k2">(</span> dest_bitmap , it , it , dest_bitmap <span class="k3">-</span><span class="k3">&gt;</span> w <span class="k3">-</span> it , dest_bitmap <span class="k3">-</span><span class="k3">&gt;</span> h <span class="k3">-</span> it , gradline<span class="k2">[</span><span class="n">20</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span></td></tr></tbody></table></div></div><p>

Note that it&#39;s only working for what you need.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 17 Jan 2006 18:05:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That could be simplified by adding the restriction of a one-pixel-width border image, so there&#39;d be no &quot;real&quot; pattern to keep.
</p></div></div><p>
Yeah, I was thinking I might have to do that due to my limited knowledge.  For simple borders above, that&#39;d work fine, since the border is too complex.  It would be nice to have different patterns though.  Of course, most borders don&#39;t have patterns...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You also couldn&#39;t have very dramatic curves in your circle or polygon =/<br />Otherwise you&#39;ll get reaaaally werid looking borders
</p></div></div><p>
The corners and curves are giving me some complications.  I haven&#39;t tried to code anything yet, so I don&#39;t know how difficult it will be.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I guess a generalized approach would be:<br />1) Vectorize the shape into a polygon.<br />2) For each edge, create a parallel line.<br />3) Find the intersection points of two adjacent parallels.<br />4) You have now vectorized the outline; render it as quads, with appropriate texture coords (s as running variable, increment by edge length per vertex; t as 0 on the original outline and as 1 on the shifted one).
</p></div></div><p>
This sounds most like what I had in my head, especially number 2.  However, you kind of lost me on number 4, I&#39;ll have to take a closer look.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
a simple way:
</p></div></div><p>
Nothing wrong with simple.  Even if I limit the borders to be pattern-less and only 1-pixel-width wide, you&#39;d still be able to create a multitude of borders for simple, rectangular shapes.  Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 17 Jan 2006 21:24:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In OpenLayer 2.0, you could make that textured border pretty simply: <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>- First retrieve the collision Shape for the image object<br />- Then convert from Shape to LineStrip<br />- Select the texture of the LineStrip<br />- Render the LineStrip and the image</p><p>Actually the code does then exactly what Tobias suggested...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Wed, 18 Jan 2006 17:30:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll made this two days ago, but didn&#39;t have change to post it till now:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td><span class="k1">int</span> border_color<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>&#160;</td></tr><tr><td class="number">5</td><td><span class="k1">unsigned</span> <span class="k1">long</span> border_blender15<span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span><span class="k2">)</span></td></tr><tr><td class="number">6</td><td><span class="k2">{</span></td></tr><tr><td class="number">7</td><td>   <span class="k1">return</span> <a href="http://www.allegro.cc/manual/makecol15" target="_blank"><span class="a">makecol15</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/getr" target="_blank"><span class="a">getr</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getg" target="_blank"><span class="a">getg</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getb" target="_blank"><span class="a">getb</span></a><span class="k2">(</span>border_color<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td><span class="k2">}</span></td></tr><tr><td class="number">9</td><td>&#160;</td></tr><tr><td class="number">10</td><td><span class="k1">unsigned</span> <span class="k1">long</span> border_blender16<span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span><span class="k2">)</span></td></tr><tr><td class="number">11</td><td><span class="k2">{</span></td></tr><tr><td class="number">12</td><td>   <span class="k1">return</span> <a href="http://www.allegro.cc/manual/makecol16" target="_blank"><span class="a">makecol16</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/getr" target="_blank"><span class="a">getr</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getg" target="_blank"><span class="a">getg</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getb" target="_blank"><span class="a">getb</span></a><span class="k2">(</span>border_color<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td><span class="k2">}</span></td></tr><tr><td class="number">14</td><td>&#160;</td></tr><tr><td class="number">15</td><td><span class="k1">unsigned</span> <span class="k1">long</span> border_blender24<span class="k2">(</span><span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span>, <span class="k1">unsigned</span> <span class="k1">long</span><span class="k2">)</span></td></tr><tr><td class="number">16</td><td><span class="k2">{</span></td></tr><tr><td class="number">17</td><td>   <span class="k1">return</span> <a href="http://www.allegro.cc/manual/makecol32" target="_blank"><span class="a">makecol32</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/getr" target="_blank"><span class="a">getr</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getg" target="_blank"><span class="a">getg</span></a><span class="k2">(</span>border_color<span class="k2">)</span>, <a href="http://www.allegro.cc/manual/getb" target="_blank"><span class="a">getb</span></a><span class="k2">(</span>border_color<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td><span class="k2">}</span></td></tr><tr><td class="number">19</td><td>&#160;</td></tr><tr><td class="number">20</td><td><span class="k1">void</span> draw_sprite_border<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>src, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> x, <span class="k1">int</span> y, <span class="k1">int</span> b_w, <span class="k1">int</span> b_c, <span class="k1">int</span> colors<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span></td></tr><tr><td class="number">21</td><td><span class="k2">{</span></td></tr><tr><td class="number">22</td><td>   <span class="k1">int</span> i<span class="k2">;</span></td></tr><tr><td class="number">23</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>tmp<span class="k2">;</span></td></tr><tr><td class="number">24</td><td>&#160;</td></tr><tr><td class="number">25</td><td>   tmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span>src-&gt;w <span class="k3">+</span> b_w <span class="k3">*</span> b_c <span class="k3">*</span> <span class="n">2</span>, src-&gt;h <span class="k3">+</span> b_w <span class="k3">*</span> b_c <span class="k3">*</span> <span class="n">2</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">26</td><td>&#160;</td></tr><tr><td class="number">27</td><td>   <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span>tmp<span class="k2">)</span></td></tr><tr><td class="number">28</td><td>      <span class="k1">return</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>&#160;</td></tr><tr><td class="number">30</td><td>   <a href="http://www.allegro.cc/manual/set_blender_mode" target="_blank"><span class="a">set_blender_mode</span></a><span class="k2">(</span>border_blender15, border_blender16, border_blender24, <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></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>   <span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> b_c<span class="k2">;</span> <span class="k3">+</span><span class="k3">+</span>i<span class="k2">)</span></td></tr><tr><td class="number">33</td><td>   <span class="k2">{</span></td></tr><tr><td class="number">34</td><td>&#160;</td></tr><tr><td class="number">35</td><td>      <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>tmp, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>      <a href="http://www.allegro.cc/manual/stretch_sprite" target="_blank"><span class="a">stretch_sprite</span></a><span class="k2">(</span>tmp, src, b_w <span class="k3">*</span> i, b_w <span class="k3">*</span> i, tmp-&gt;w <span class="k3">-</span> b_w <span class="k3">*</span> i <span class="k3">*</span> <span class="n">2</span>, tmp-&gt;h <span class="k3">-</span> b_w <span class="k3">*</span> i <span class="k3">*</span> <span class="n">2</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">37</td><td>      border_color <span class="k3">=</span> colors<span class="k3">&lt;</span>i&gt;<span class="k2">;</span></td></tr><tr><td class="number">38</td><td>      <a href="http://www.allegro.cc/manual/draw_trans_sprite" target="_blank"><span class="a">draw_trans_sprite</span></a><span class="k2">(</span>dest, tmp, x, y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">40</td><td>&#160;</td></tr><tr><td class="number">41</td><td>   <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>dest, src, x <span class="k3">+</span> b_w <span class="k3">*</span> b_c, y <span class="k3">+</span> b_w <span class="k3">*</span> b_c<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">42</td><td>   <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>tmp<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">43</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>

First custom blender is set which for each pixel drawn with draw_trans/lit_sprite returns global_color. Then for each border, image is stretched into temporary and drawn into destination. This is when custom blender kicks in and draws entire image as solid color. This is repeated for every border except image is stretched less and less. Finally original image is drawn.</p><p>It has two problems: It looks ugly and borders are drawn tiner as lines get more angled (see attached image, red primitive is default image).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hrvoje Ban)</author>
		<pubDate>Thu, 19 Jan 2006 14:07:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Cool!  Although, at first glance, I haven&#39;t quite figured out how it works.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />  Is b_w &quot;border width&quot; and b_c &quot;border color&quot;?  Also, is src the bitmap border to be applied to the picture?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It has two problems: It looks ugly and borders are drawn tiner as lines get more angled (see attached image, red primitive is default image).
</p></div></div><p>

Looks pretty good to me!  I&#39;ll mess around with it when I get home and let you know if I have any other problems.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Fri, 20 Jan 2006 02:13:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>src is bitmap which should be bordered (not modified)<br />dest is bitmap on which src + borders are drawn<br />b_w is single border width<br />b_c is number of borders (count)<br />colors is simple a array of ints created my makecol*() (number of colors == b_c)</p><p>Working is quite simple: When <a href="http://www.allegro.cc/manual/draw_trans_sprite">draw_trans_sprite</a>/<a href="http://www.allegro.cc/manual/draw_lit_sprite">draw_lit_sprite</a> are used they call special blender functions for each pixel they are about to draw (see <a href="http://www.allegro.cc/manual/api/transparency-and-patterned-drawing/">Truecolor transparency</a>). When my blenders are use they simple return current border color for every pixel.<br />When drawing border I stretch source bitmap into temporary so it has size as current border and then I draw it with <a href="http://www.allegro.cc/manual/draw_trans_sprite">draw_trans_sprite</a> which draws that stretched sprite in one color (blenders). I repeat this for all borders.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hrvoje Ban)</author>
		<pubDate>Fri, 20 Jan 2006 02:35:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>However, that can&#39;t do textured borders, but only solid color ones... (Though you could render several solid color borders to get the effect like in the screenshot)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fladimir da Gorf)</author>
		<pubDate>Fri, 20 Jan 2006 03:50:59 +0000</pubDate>
	</item>
</rss>
