[etoys-dev] Etoys: Connectors-kfr.188.mcz
karl ramberg
karlramberg at gmail.com
Sun May 30 07:19:11 EDT 2010
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....
Karl
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
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100530/9b74eab6/attachment.html
More information about the etoys-dev
mailing list