[etoys-dev] Etoys: Connectors-bf.189.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 30 17:55:44 EDT 2010
Bert Freudenberg uploaded a new version of Connectors to project Etoys:
http://source.squeak.org/etoys/Connectors-bf.189.mcz
==================== Summary ====================
Name: Connectors-bf.189
Author: bf
Time: 30 May 2010, 11:54:59 pm
UUID: e0dce457-58de-4500-b045-7d38ad39d2c2
Ancestors: Connectors-kfr.188
- move overlapsShadowForm:bounds: back to Morphic package
=============== Diff against Connectors-kfr.188 ===============
Item was removed:
- ----- 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 !
More information about the etoys-dev
mailing list