[Pharo-project] Fwd: Canvas >>draw: anObject

Stéphane Ducasse Stephane.Ducasse at inria.fr
Tue Feb 8 11:20:56 CET 2011



Begin forwarded message:

> From: "juan at jvuletich.org" <juan at jvuletich.org>
> Date: February 8, 2011 2:25:33 AM GMT+01:00
> To: stephane.ducasse at inria.fr, juan at jvuletich.org
> Subject: RE: Canvas >>draw: anObject
> Reply-To: juan at 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 at inria.fr
> Date: Mon, 7 Feb 2011 22:41:08 +0100
> To: juan at jvuletich.org, Pharo-project at 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
> 
> 






More information about the Pharo-project mailing list