@@ -1178,19 +1178,17 @@ If the namespace does not, they are colored the unbound color.
11781178 (when (update-latent-arrows mouse-x mouse-y)
11791179 (start-arrow-draw-timer syncheck-arrow-delay)))
11801180
1181- (when admin
1181+ (define canvas (get-canvas))
1182+ (when (and canvas admin)
11821183 (define hb (box 0 ))
11831184 (define wb (box 0 ))
11841185 (get-extent wb #f )
11851186 (define max-width-for-arrow (unbox wb))
11861187 (unless (zero? max-width-for-arrow)
11871188 (get-view-size wb hb)
11881189 (define-values (inset-x inset-y)
1189- (cond
1190- [(get-canvas)
1191- (values (send (get-canvas) horizontal-inset)
1192- (send (get-canvas) vertical-inset))]
1193- [else (values 0 0 )]))
1190+ (values (send (get-canvas) horizontal-inset)
1191+ (send (get-canvas) vertical-inset)))
11941192
11951193 ;; if anything in this vector changes, then
11961194 ;; the tacked arrows will draw differently
@@ -1201,7 +1199,7 @@ If the namespace does not, they are colored the unbound color.
12011199 cursor-text
12021200 cursor-pos))
12031201 (send mouse-over-arrow-drawing handle-arrow-drawing
1204- dc dx dy inset-x inset-y (unbox wb) (unbox hb)
1202+ canvas dc dx dy inset-x inset-y (unbox wb) (unbox hb)
12051203 max-width-for-arrow
12061204 this
12071205 mouse-over-current-arrows-key
@@ -1214,7 +1212,7 @@ If the namespace does not, they are colored the unbound color.
12141212 max-width-for-arrow
12151213 (hash-copy tacked-hash-table)))
12161214 (send tacked-arrow-drawing handle-arrow-drawing
1217- dc dx dy inset-x inset-y (unbox wb) (unbox hb)
1215+ canvas dc dx dy inset-x inset-y (unbox wb) (unbox hb)
12181216 max-width-for-arrow
12191217 this
12201218 tacked-over-current-arrows-key
@@ -2019,7 +2017,9 @@ If the namespace does not, they are colored the unbound color.
20192017 (define arrows-bitmap #f )
20202018
20212019 ;; determine-the-arrows : -> (listof arrows-and-min-max-width?)
2022- (define/public (handle-arrow-drawing dc dx dy inset-x inset-y width height max-width-for-arrow text current-arrows-key determine-the-arrows)
2020+ (define/public (handle-arrow-drawing canvas dc dx dy inset-x inset-y width height
2021+ max-width-for-arrow text current-arrows-key
2022+ determine-the-arrows)
20232023 (cond
20242024 [(equal? current-arrows-key bitmap-arrows-key)
20252025 (when arrows-bitmap
@@ -2043,7 +2043,8 @@ If the namespace does not, they are colored the unbound color.
20432043 (unless (and arrows-bitmap
20442044 (= (send arrows-bitmap get-width) width)
20452045 (= (send arrows-bitmap get-height) height))
2046- (set! arrows-bitmap (make-screen-bitmap width height)))
2046+ ; (message-box "making bitmap" (format "~s ~s" width height))
2047+ (set! arrows-bitmap (send canvas make-bitmap width height)))
20472048
20482049 (define bdc (make-object bitmap-dc% arrows-bitmap))
20492050 (send bdc erase)
0 commit comments