Draw :-> and :--> ourselves, similar to --> and friends.
svn: r13698
This commit is contained in:
parent
e21ecbe074
commit
560836a804
|
@ -7,7 +7,7 @@
|
|||
(provide/contract
|
||||
[make-arrow-pict
|
||||
(-> string?
|
||||
(symbols 'curvy 'straight 'straight-double)
|
||||
(symbols 'curvy 'straight 'straight-double 'map)
|
||||
symbol?
|
||||
number?
|
||||
(-> pict?))])
|
||||
|
@ -71,6 +71,17 @@
|
|||
(case style
|
||||
[(curvy)
|
||||
(send dc draw-path path dx dy)]
|
||||
[(map)
|
||||
(send dc draw-line
|
||||
dx
|
||||
(- (+ dy line-pos) (/ head-height 2))
|
||||
dx
|
||||
(+ (+ dy line-pos) (/ head-height 2)))
|
||||
(send dc draw-line
|
||||
dx
|
||||
(+ dy line-pos)
|
||||
(+ dx w)
|
||||
(+ dy line-pos))]
|
||||
[(straight)
|
||||
(send dc draw-line
|
||||
dx
|
||||
|
|
|
@ -344,6 +344,8 @@
|
|||
(define short-curvy-arrow-pict (mk-arrow-pict "m" 'curvy))
|
||||
(define double-arrow-pict (mk-arrow-pict "xxx" 'straight-double))
|
||||
(define short-double-arrow-pict (mk-arrow-pict "m" 'straight-double))
|
||||
(define map-arrow-pict (mk-arrow-pict "m" 'map))
|
||||
(define long-map-arrow-pict (mk-arrow-pict "xxx" 'map))
|
||||
|
||||
(define user-arrow-table (make-hasheq))
|
||||
(define (set-arrow-pict! arr thunk)
|
||||
|
@ -362,8 +364,14 @@
|
|||
[(>->) (basic-text "\u21a3" (default-style))]
|
||||
[(~~>) (curvy-arrow-pict)]
|
||||
[(~>) (short-curvy-arrow-pict)]
|
||||
[(:->) (basic-text "\u21a6" (default-style))]
|
||||
[(:-->) (basic-text "\u27fc" (default-style))]
|
||||
[(:->)
|
||||
(if STIX?
|
||||
(basic-text "\u21a6" (default-style))
|
||||
(map-arrow-pict))]
|
||||
[(:-->)
|
||||
(if STIX?
|
||||
(basic-text "\u27fc" (default-style))
|
||||
(long-map-arrow-pict))]
|
||||
[(c->) (basic-text "\u21aa" (default-style))]
|
||||
[(-->>) (basic-text "\u21a0" (default-style))]
|
||||
[(>--) (basic-text "\u291a" (default-style))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user