DisplayObject.st
changeset 21 66b31c91177f
parent 17 1990d8455d01
child 23 11c422f6d825
--- a/DisplayObject.st	Fri Feb 25 14:11:30 1994 +0100
+++ b/DisplayObject.st	Fri Jun 03 02:54:11 1994 +0200
@@ -18,16 +18,38 @@
 !
 
 DisplayObject comment:'
+COPYRIGHT (c) 1989 by Claus Gittinger
+              All Rights Reserved
+'!
 
-COPYRIGHT (c) 1989 by Claus Gittinger
+!DisplayObject class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-generic superclass for Display Objects held in ObjectViews
-see DrawObject/LogicObject/DeskTopObject and subclasses for example use
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
 
-$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.6 1994-01-09 21:51:01 claus Exp $
-written fall/winter 89 by claus
-'!
+version
+"
+$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.7 1994-06-03 00:52:07 claus Exp $
+"
+!
+
+documentation
+"
+    generic superclass for Display Objects held in ObjectViews
+    see DrawObject/LogicObject/DeskTopObject and subclasses for example use
+"
+! !
 
 !DisplayObject class methodsFor:'instance creation'!
 
@@ -188,23 +210,27 @@
         ^ frame containsPoint:aPoint
     ].
 
-    "its quicker to not create a new rectangle for the test"
+    "
+     its quicker to not create a new rectangle for the test
+     (which is not obvious for simple lines, but complex polygons may
+      call this for many of its components)
+    "
     org := frame origin.
     left := org x - delta.
 
     px := aPoint x.
-    (px < left) ifTrue:[^ false].
+    (px < left) ifTrue:[^ false].   "aPoint is to the left of my left edge"
 
     d2 := delta * 2.
     right := left + frame width + d2.
-    (px > right) ifTrue:[^ false].
+    (px > right) ifTrue:[^ false].  "aPoint is to the right of my right edge"
 
     top := org y - delta.
     py := aPoint y.
-    (py < top) ifTrue:[^ false].
+    (py < top) ifTrue:[^ false].    "aPoint is above my top edge"
 
     bott := top + frame height + d2.
-    (py > bott) ifTrue:[^ false].
+    (py > bott) ifTrue:[^ false].   "aPoint is below my bottom edge"
 
     ^ true
 !