Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The simple answer to your question is that the gap seems to come from the explicit height you give to the first graphic. Simply remove it and the gap will be gone.</p> <p>The (IMO) better answer is that this code seems a bit convoluted for creating simple graphics. </p> <ul> <li>There is no reason you should wrap each line in a <code>Graphics</code> class. You can extend Graphic to create a standalone, reusable graphic class though.</li> <li>There is a <code>Line</code> class for drawing straight lines. Much easier than using <code>Path</code></li> </ul> <p>If you absolutely need the <code>VerticalLayout</code>, you could rewrite that code like this:</p> <pre><code>&lt;s:Group&gt; &lt;s:layout&gt; &lt;s:VerticalLayout gap="0" horizontalAlign="center" /&gt; &lt;/s:layout&gt; &lt;s:Line height="100"&gt; &lt;s:stroke&gt; &lt;s:SolidColorStroke color="#333333" /&gt; &lt;/s:stroke&gt; &lt;/s:Line&gt; &lt;s:Line width="100"&gt; &lt;s:stroke&gt; &lt;s:SolidColorStroke color="#333333" /&gt; &lt;/s:stroke&gt; &lt;/s:Line&gt; &lt;/s:Group&gt; </code></pre> <p>But if you don't really need it for some reason, it can even be reduced to this:</p> <pre><code>&lt;s:Group&gt; &lt;s:Line height="100" horizontalCenter="0"&gt; &lt;s:stroke&gt; &lt;s:SolidColorStroke color="#333333" /&gt; &lt;/s:stroke&gt; &lt;/s:Line&gt; &lt;s:Line width="100" bottom="0"&gt; &lt;s:stroke&gt; &lt;s:SolidColorStroke color="#333333" /&gt; &lt;/s:stroke&gt; &lt;/s:Line&gt; &lt;/s:Group&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload