[etoys-dev] Etoys: Connectors-kfr.188.mcz
bert at freudenbergs.de
Sun May 30 17:56:27 EDT 2010
On 30.05.2010, at 13:19, karl ramberg wrote:
> Ugh, it was not meant to move it...
> The method was part of the Connectors package before I think, category Morph *connectors-geometry. (Made by Ned Konz in 2003)
> I'm not sure why that is method is in Morphic package in the Etoys image....
Because it is not only used by Connectors. I moved it back.
Please, before committing to the etoys repository, *always* check the changes, to make sure you only commit what you intended to.
- Bert -
> On Sun, May 30, 2010 at 10:16 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> 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
> etoys-dev mailing list
> etoys-dev at squeakland.org
More information about the etoys-dev