[squeak-dev] The Trunk: MorphicExtras-pre.238.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 8 14:38:37 UTC 2018


Patrick Rein uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-pre.238.mcz

==================== Summary ====================

Name: MorphicExtras-pre.238
Author: pre
Time: 8 June 2018, 4:37:55.016586 pm
UUID: ccc1c75c-1a68-a84c-a44b-2f5f0b6c3dbc
Ancestors: MorphicExtras-kfr.237

Adds convenience methods for exporting a morph as postscript according to the schema used for png export

=============== Diff against MorphicExtras-kfr.237 ===============

Item was changed:
+ ----- Method: EPSCanvasTest>>testSmokeTest (in category 'tests') -----
- ----- Method: EPSCanvasTest>>testSmokeTest (in category 'as yet unclassified') -----
  testSmokeTest
+ 	
+ 	| epsCode |
+ 	epsCode := (RectangleMorph new asEPS).
- | epsCode |
- epsCode := (RectangleMorph new asEPS).
  
+ 	self assert: epsCode lines first = '%!!PS-Adobe-2.0 EPSF-2.0'.
+ 	self assert: (epsCode lines detect: [:line | 
+ 		line beginsWith: '%start morph:  a RectangleMorph'] ifNone: [nil]) notNil.
+ 	self assert: epsCode lines last = '%%EOF'
- self assert: epsCode lines first = '%!!PS-Adobe-2.0 EPSF-2.0'.
- 
- self assert: (epsCode lines detect: [:line | line beginsWith: '%start morph:  a RectangleMorph'] ifNone: [nil]) notNil.
- 
- self assert: epsCode lines last = '%%EOF'
  !

Item was added:
+ ----- Method: Morph>>exportAsEPS (in category '*MorphicExtras-postscript') -----
+ exportAsEPS
+ 
+ 	| fName |
+ 	fName := UIManager default saveFilenameRequest:'Please enter the name' translated initialAnswer: self externalName,'.eps'.
+ 	fName ifNil:[^self].
+ 	self exportAsEPSNamed: fName
+ !

Item was added:
+ ----- Method: Morph>>exportAsEPSNamed: (in category '*MorphicExtras-postscript') -----
+ exportAsEPSNamed: aString
+ 
+ 	FileStream fileNamed: aString do: [:stream |
+ 		stream nextPutAll: self asEPS]
+ !



More information about the Squeak-dev mailing list