Socialmetrica/Socialmetrica.package/RSCanvas.extension/instance/exportAsFileNamed.into..st

13 lines
335 B
Smalltalk
Raw Permalink Normal View History

*Socialmetrica
exportAsFileNamed: aName into: aFolder
2022-06-17 23:10:48 +00:00
| exporters |
exporters := {'png' -> #pngExporter .
'pdf' -> #pdfExporter } asDictionary.
exporters keysAndValuesDo: [:k :v |
(self perform: v)
zoomToShapes;
noFixedShapes;
fileName: (aFolder / (aName, '.', k)) fullName;
export.
].
^ aFolder / aName, 'png'