macro-stepper: dummy editor-admin for image creation
original commit: a45792ca1c9cb02913ef479116ce4d2f11dae0b0
This commit is contained in:
parent
34f6418e1e
commit
3e4edfb3bb
|
@ -48,8 +48,8 @@ TODO: tacked arrows
|
||||||
(define (print-syntax-to-bitmap stx
|
(define (print-syntax-to-bitmap stx
|
||||||
#:columns [columns (print-syntax-columns)])
|
#:columns [columns (print-syntax-columns)])
|
||||||
(define t (prepare-editor stx columns))
|
(define t (prepare-editor stx columns))
|
||||||
(define f (new frame% [label "dummy"]))
|
(define admin (new dummy-admin%))
|
||||||
(define ec (new editor-canvas% (editor t) (parent f)))
|
(send t set-admin admin)
|
||||||
(define dc (new bitmap-dc% (bitmap (make-object bitmap% 1 1))))
|
(define dc (new bitmap-dc% (bitmap (make-object bitmap% 1 1))))
|
||||||
(define char-width
|
(define char-width
|
||||||
(let* ([sl (send t get-style-list)]
|
(let* ([sl (send t get-style-list)]
|
||||||
|
@ -93,3 +93,13 @@ TODO: tacked arrows
|
||||||
(new controller%) (new syntax-prefs/readonly%)
|
(new controller%) (new syntax-prefs/readonly%)
|
||||||
columns (send t last-position))
|
columns (send t last-position))
|
||||||
t)
|
t)
|
||||||
|
|
||||||
|
;; dummy editor-admin
|
||||||
|
(define dummy-admin%
|
||||||
|
(class editor-admin%
|
||||||
|
(define the-dc (new bitmap-dc% (bitmap (make-object bitmap% 1 1))))
|
||||||
|
(define/override (get-dc [x #f] [y #f])
|
||||||
|
(when x (set-box! x 0.0))
|
||||||
|
(when y (set-box! y 0.0))
|
||||||
|
the-dc)
|
||||||
|
(super-new)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user