I found the followint method missing from 3.4 beta
'From Squeak3.2 of 11 July 2002 [latest update: #4956] on 7 January 2003 at 6:01:17 am'!
!PolygonMorph methodsFor: 'geometry' stamp: 'sw 9/14/97 18:22'! flipVAroundY: centerY "Flip me vertically around the center. If centerY is nil, compute my center of gravity."
| cent | cent _ centerY ifNil: [bounds center y "cent _ 0. vertices do: [:each | cent _ cent + each y]. cent asFloat / vertices size"] "average is the center" ifNotNil: [centerY]. self setVertices: (vertices collect: [:vv | vv x @ ((vv y - cent) * -1 + cent)]) reversed.! !
Also I suggest add the following
!PolygonMorph methodsFor: 'geometry' stamp: 'EDC 3/20/2002 14:24'! flipHAroundX: centerX "Flip me horizontally around the center. If centerX is nil, compute my center of gravity."
| cent | cent _ centerX ifNil: [bounds center x "cent _ 0. vertices do: [:each | cent _ cent + each x]. cent asFloat / vertices size"] "average is the center" ifNotNil: [centerX]. self setVertices: (vertices collect: [:vv | ((vv x - cent) * -1 + cent) @ vv y]) reversed.! !
By the way , I like know who is sw , to who I copy and say thanks.
Edgar
squeak-dev@lists.squeakfoundation.org