Begin forwarded message:
From: "juan@jvuletich.org" <juan@jvuletich.org> Date: February 8, 2011 2:25:33 AM GMT+01:00 To: stephane.ducasse@inria.fr, juan@jvuletich.org Subject: RE: Canvas >>draw: anObject Reply-To: juan@jvuletich.org
(Please forward to Pharo, it seems I can't send to it from webmail)
The difference is not really important. If you have a Morph that draws outside its bounds (no morph should ever do that) the version in SM (I guess it is the original Squeak code), will clip. The Pharo version won't. That means that such a morph would leave a trail if moved around.
For example, I just added: aCanvas fillRectangle: (bounds translateBy: 10) fillStyle: Color red. at the start of EllipseMorph>>drawOn: , and modified #draw: to be like in Pharo. Then you open an ellipse, and when you move it around it leaves red garbage.
If morphs work properly, then it makes no difference. Maybe a very slight performance difference, but not sure.
HTH.
Cheers, Juan Vuletich
Original Message: ----------------- From: Stéphane Ducasse stephane.ducasse@inria.fr Date: Mon, 7 Feb 2011 22:41:08 +0100 To: juan@jvuletich.org, Pharo-project@lists.gforge.inria.fr Subject: Canvas >>draw: anObject
Canvas>>draw: anObject ^anObject drawOn: self
Now in SM we got
SMxCanvas>>draw: anObject ^self clipBy: anObject bounds during: [ :c | anObject drawOn: c]
and I'm wondering what is the exact difference. Any idea?
Stef
-------------------------------------------------------------------- mail2web.com â Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail