1 USING: accessors hashtables images images.viewer io io.styles
2 kernel math namespaces prettyprint.custom prettyprint.sections
3 sequences ui.gadgets.panes ;
4 FROM: images => image ;
5 IN: images.viewer.prettyprint
7 TUPLE: image-section < section
10 CONSTANT: approx-pixels-per-cell 8
12 : <image-section> ( image -- section )
13 dup dim>> first approx-pixels-per-cell /i image-section new-section
15 swap presented associate >>style ;
17 M: image-section long-section
19 M: image-section short-section
20 image>> <image-gadget> output-stream get write-gadget ;
23 <image-section> add-section ;