IIRC the argument of the block would be the transformed canvas. So, inside the block you should refer to it instead of your original &quot;canvas&quot;.<div><div><br></div><div>Cheers,</div><div>Richo<br><br><div class="gmail_quote">

On Tue, Nov 15, 2011 at 9:44 PM, Jonathan Mullins <span dir="ltr">&lt;<a href="mailto:j.mullins@gmx.com">j.mullins@gmx.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word">Hi, I&#39;m wondering if someone could help me with rotating rectangles... here is my current code:<div><br></div><div><div><font face="Menlo">drawRectangleFor: aSprite width: aWidth height: aHeight</font></div>

<div><font face="Menlo"><br></font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>| o canvas rect |</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>self createOrResizeTrailsForm. &quot;ensure the form that we&#39;ll draw on exists&quot;</font></div>

<div><font face="Menlo"><br></font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>o _ (aSprite referencePosition x + 240 )@(180 - aSprite referencePosition y).</font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>canvas _ FormCanvas on: penTrailsForm.</font></div>

<div><font face="Menlo"><span style="white-space:pre-wrap">        </span>rect _ Rectangle origin: o extent: (aWidth@aHeight).</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>&quot;draw it&quot;</font></div>

<div><font face="Menlo"><span style="white-space:pre-wrap">        </span>canvas frameAndFillRectangle: rect fillColor: aSprite fillColor borderWidth: aSprite penSize borderColor: aSprite penColor.</font></div><div><font face="Menlo"><span style="white-space:pre-wrap">        </span>self changed.</font></div>

<div><br></div><div><br></div></div><div>I attempted to rotate <font face="Menlo">canvas</font> using <font face="Menlo">transformBy: aDisplayTransform clippingTo: aClipRect during: aBlock smoothing: cellSize</font> but I don&#39;t understand the argument <font face="Menlo">during: aBlock</font>. What code should be passed in here? I noticed the block should take one argument called <font face="Menlo">offset</font>.</div>

<div><br></div><div>Cheers, Jonathan</div></div><br><br>
<br></blockquote></div><br></div></div>