Modurizing file exporters.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-06-17 18:10:48 -05:00
parent fdeecc5fde
commit 29b758c58a

View File

@ -1,14 +1,13 @@
*Socialmetrica *Socialmetrica
exportAsFileNamed: aName into: aFolder exportAsFileNamed: aName into: aFolder
| exporters |
self pngExporter exporters := {'png' -> #pngExporter .
'pdf' -> #pdfExporter } asDictionary.
exporters keysAndValuesDo: [:k :v |
(self perform: v)
zoomToShapes; zoomToShapes;
noFixedShapes; noFixedShapes;
fileName: (aFolder / (aName, 'png')) fullName; fileName: (aFolder / (aName, '.', k)) fullName;
export. export.
"self pdfExporter ].
zoomToShapes;
noFixedShapes;
fileName: (aFolder / (aName, 'pdf')) fullName;
export."
^ aFolder / aName, 'png' ^ aFolder / aName, 'png'