[etoys-dev] Etoys: Connectors-kfr.188.mcz

Bert Freudenberg bert at freudenbergs.de
Sun May 30 04:16:51 EDT 2010


I don't see a reason to move that method from Morphic to the Connectors package. Is there?

In general, we should avoid moving things between packages unless we actually want to clean up packages. I'd suggest to separate bug fixing from recategorizing.

Moving methods is delicate in current Monticello. E.g., to move this method back we need a config map that loads Morphic before Connectors.

- Bert -

On 29.05.2010, at 23:48, commits at source.squeak.org wrote:

> Karl Ramberg uploaded a new version of Connectors to project Etoys:
> http://source.squeak.org/etoys/Connectors-kfr.188.mcz
> 
> ==================== Summary ====================
> 
> Name: Connectors-kfr.188
> Author: kfr
> Time: 30 May 2010, 1:48:03 am
> UUID: 2707f7a6-10ce-f343-bac3-aed3a747f5eb
> Ancestors: Connectors-bf.187
> 
> Fix the overlap logic in Morph>>overlapsShadowForm:bounds:
> 
> Fix for not including self in testing for overlaps i Player>>overlapsAny:
> 
> Refactor Player>>overlaps: to use Morph>>overlapsShadowForm:bounds:
> 
> =============== Diff against Connectors-bf.187 ===============
> 
> Item was added:
> + ----- Method: Morph>>overlapsShadowForm:bounds: (in category '*connectors-geometry') -----
> + overlapsShadowForm: itsShadow bounds: itsBounds
> + 	"Answer true if itsShadow and my shadow overlap at all"
> + 	| overlapExtent overlap myRect myShadow goalRect goalShadow bb |
> + 	overlap _ self fullBounds intersect: itsBounds.
> + 	overlapExtent _ overlap extent.
> + 	overlapExtent > (0 @ 0)
> + 		ifFalse: [^ false].
> + 	myRect := overlap translateBy: 0 @ 0 - self topLeft.
> + 	myShadow := (self imageForm contentsOfArea: myRect) stencil.
> + 	goalRect := overlap translateBy: 0 @ 0 - itsBounds topLeft.
> + 	goalShadow := (itsShadow contentsOfArea: goalRect) stencil.
> + 
> + 			"compute a pixel-by-pixel AND of the two stencils.  Result will be black 
> + 			(pixel value = 1) where black parts of the stencils overlap"
> + 			bb := BitBlt toForm: myShadow.
> + 			bb 
> + 				copyForm: goalShadow
> + 				to: 0 @ 0
> + 				rule: Form and.
> + 	
> + 	^(bb destForm tallyPixelValues second) > 0 !
> 
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev




More information about the etoys-dev mailing list