[Cuis-dev] Collision detection and is close to a point for Morphs

Juan Vuletich juan at jvuletich.org
Wed Jul 7 12:41:06 PDT 2021


Hi Folks,

I just did a push to github with a couple of new features for 
VectorGraphics. Just pull repos, and start with a VM that includes the 
latest VectorEnginePlugin (i.e. one from Gerald, Dave or me, less than 2 
days old). On other VMs, everything should also work, but with slow 
drawing vector graphics.

Now create a couple of M3Exp01Morph. Keep your Transcript open See what 
happen when you drag one of these around, and it touches another morph. 
Especially see what happens when it touches one of its own kind :-) . 
Also note that this morph is grabbed even when the mouse is a few pixels 
away.

I also added a #postDrawOn:, to check that the contour is correctly 
updated in these cases.

Browse a bit M3Exp01Morph. The new services are #collides: and 
#isCloserThan:toPoint: . You can also open an inspector and do `self 
drawContour`. And above all, have as much fun as I am having playing 
with this!

Thanks Hilaire for asking for this!

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list