<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;Draws one shape based on relative node points.&lt;/p&gt;
&lt;p&gt;Options&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;:x and :y &amp;#8211; Initial position.&lt;/li&gt;
	&lt;li&gt;:content &amp;#8211; Facade to ShapeContent with same parameters.&lt;/li&gt;
	&lt;li&gt;:border &amp;#8211; Facade to Border with same parameters.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Examples&lt;/p&gt;
&lt;pre&gt;&lt;code class='ruby'&gt;
 doc.polygon :x =&amp;gt; 3.5, :y =&amp;gt; 5.5 do
   node :x =&amp;gt; 4,  :y =&amp;gt; 0
   node :x =&amp;gt; 0,  :y =&amp;gt; -4
   node :x =&amp;gt; -4, :y =&amp;gt; 0
   node :x =&amp;gt; 0,  :y =&amp;gt; 4
 end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;http://www.hashcode.eti.br/static_images/polygon01.png&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class='ruby'&gt;
 doc.polygon :x =&amp;gt; 3.5, :y =&amp;gt; 4.5 do
   node :x =&amp;gt; 2,  :y =&amp;gt; 2
   node :x =&amp;gt; 2,  :y =&amp;gt; -2
   node :x =&amp;gt; -2, :y =&amp;gt; -2
 end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;http://www.hashcode.eti.br/static_images/polygon02.png&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class='ruby'&gt;
 doc.polygon :x =&amp;gt; 1, :y =&amp;gt; 5, :border =&amp;gt; {:width =&amp;gt; 2, :linejoin =&amp;gt; 1} do
   node :x =&amp;gt; 2,  :y =&amp;gt; 2/2
   node :x =&amp;gt; 2*2,:y =&amp;gt; -2
   node :x =&amp;gt; -1, :y =&amp;gt; -3
   node :x =&amp;gt; 2,  :y =&amp;gt; 1
   node :x =&amp;gt; 3,  :y =&amp;gt; 2
 end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;http://www.hashcode.eti.br/static_images/polygon03.png&quot; /&gt;&lt;/p&gt;</body>
  <created-at type="datetime">2009-11-26T14:44:56-08:00</created-at>
  <id type="integer">103007</id>
  <permalink>polygon</permalink>
  <repository-id type="integer">89573</repository-id>
  <title>Polygon </title>
  <updated-at type="datetime">2009-08-03T05:01:50-07:00</updated-at>
  <user-id type="integer">22649</user-id>
</wiki>
