'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5623] on 14 January 2004 at 12:13:37 pm'! "Change Set: PolygonFlipMethods Date: 14 January 2004 Author: Marcus Denker md: just reposting... (I have no idea if the change proposed makes any sense. I'm no morphic expert) Original: Date: Tue, 13 Jan 2004 06:48:26 +0800 From: Lic. Edgar J. De Cleene Subject: [RFI]Having flip metods again in image (was [BUG] Missing methods in 3.4 beta) In images previous to 3.4 , we have a flip method for polygons made for Scott Wallace. I copy his and do other and used a lot in several games. This are removed from image and I asked to have again. Appologize to Ken for think he is in charge of this stuff. "! !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.! ! !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.! !