[Newbies] Generating subMorphs with relative coordinates

Christian Kellermann ckeen at pestilenz.org
Thu Oct 31 21:04:49 UTC 2019


* Nicola Mingotti <nmingotti at gmail.com> [191031 21:53]:
> 
> Hi Christian,
> 
> Try this snippet, I think it is self explanatory.
> 
> -----------
> tr := TransformMorph new.
> tr openInWorld.
> tr bounds: (100 at 100 corner: 300 at 300).
> 
> c1 := CircleMorph new.
> tr addMorph: c1.
> c1 position." 0 at 0"
> c1 center: 0 at 0.
> -----------
> 

Excellent, that's exactly what I need!

Grazie mille!

-- 
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.


More information about the Beginners mailing list