'From etoys2.2 of 3 October 2007 [latest update: #1775] on 15 November 2007 at 12:37:31 am'! "Change Set: flipfixes Date: 14 November 2007 Author: kks Added flip/tumble methods to Player and Viewer. Fixed flip methods in SketchMorph to take rotationCenter into account"! !Player methodsFor: 'costume' stamp: 'kks 11/14/2007 23:39'! flip | cos | ((cos _ self costume renderedMorph) isSketchMorph) ifTrue: [cos flipHorizontal]! ! !Player methodsFor: 'costume' stamp: 'kks 11/5/2007 23:54'! flipHorizontal | cos | ((cos _ self costume renderedMorph) isSketchMorph) ifTrue: [cos flipHorizontal]! ! !Player methodsFor: 'costume' stamp: 'kks 11/5/2007 23:54'! flipVertical | cos | ((cos _ self costume renderedMorph) isSketchMorph) ifTrue: [cos flipVertical]! ! !Player methodsFor: 'costume' stamp: 'kks 11/14/2007 23:39'! tumble | cos | ((cos _ self costume renderedMorph) isSketchMorph) ifTrue: [cos flipVertical]! ! !SketchMorph methodsFor: 'e-toy support' stamp: 'kks 11/15/2007 00:28'! flipHorizontal | r | r _ self rotationCenter. self left: self left - (1.0 - (2 * r x) * self width). self form: (self form flipBy: #horizontal centerAt: self form center). self rotationCenter: (1 - r x) @ (r y).! ! !SketchMorph methodsFor: 'e-toy support' stamp: 'kks 11/15/2007 00:32'! flipVertical | r | r _ self rotationCenter. self top: self top - (1.0 - (2 * r y) * self height). self form: (self form flipBy: #vertical centerAt: self form center). self rotationCenter: r x @ (1 - r y).! ! !SketchMorph class methodsFor: 'scripting' stamp: 'kks 11/14/2007 23:39'! additionsToViewerCategories "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." ^ #((graphics ( (slot graphic 'The picture currently being worn' Graphic readWrite Player getGraphic Player setGraphic:) (command wearCostumeOf: 'wear the costume of...' Player) (slot baseGraphic 'The picture originally painted for this object, but can subsequently be changed via menu or script' Graphic readWrite Player getBaseGraphic Player setBaseGraphic:) (command restoreBaseGraphic 'Make my picture be the one I remember in my baseGraphic') (slot rotationStyle 'How the picture should change when the heading is modified' RotationStyle readWrite Player getRotationStyle Player setRotationStyle:) (command flip 'Flip left right' Player) (command tumble 'Flip up down' Player) ))) ! !