<div dir="ltr">A morph is a morph, of course, of course<div>Unless the morph is an Etoys morph</div><div><br></div><div>Got it. Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 6, 2016 at 10:33 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04.05.2016, at 19:48, Michael Rice &lt;<a href="mailto:limitcase@gmail.com">limitcase@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; I&#39;m experimenting with subclassing PasteUpMorph to get some additional behavior. One thing I want to do is have my subclass open with a CircleMorph at 0@0. I already get that behavior, the CircleMorph in the upper left corner, but want my subclass&#39; origin to be at its center, and the CircleMorph drawn there. My current initialize method,<br>
&gt;<br>
&gt; initialize<br>
&gt;       &quot;&quot;<br>
&gt;<br>
&gt;       super initialize.<br>
&gt;       self originAtCenter; addMorph: ((CircleMorph new) color: Color white) centeredNear: 0@0.<br>
&gt;<br>
&gt; still places it in the upper left corner.<br>
&gt;<br>
&gt; How do I get the origin, 0@0, at the center?<br>
<br>
</span>You could use<br>
<br>
        circle x: 0 y: 0.<br>
<br>
The originAtCenter flag only affects the PasteUpMorph’s cartesianOrigin which is used by Etoys (via the x/y methods) and puts the origin at either its lowerLeft corner or its center, just as in Math (and unlike Squeak).<br>
<br>
That said, Morphic currently does not use a fully transform-based graphics engine. You cannot easily transform the coordinate system for submorphs. Etoys gets around this by applying the origin offset in its x/y accessors (which also flip the y direction from downwards to upwards).<br>
<span class="HOEnZb"><font color="#888888"><br>
- Bert -<br>
<br>
<br>
<br>
</font></span><br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>