Skip to content
16 changes: 8 additions & 8 deletions drracket-core-lib/scribble/tools/private/mk-drs-bitmaps.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
(define (draw dc str dx dy color?)
(send dc clear)
(send dc set-font (send the-font-list find-or-create-font 15 " Futura" 'swiss 'normal 'bold))
(let-values ([(tw th _1 _2) (send dc get-text-extent "@")])
(when color? (send dc set-text-foreground (send the-color-database find-color "gray")))
(send dc draw-text "@"
(- (/ width 2) (/ tw 2))
(- (/ height 2) (/ th 2)))
(send dc set-font (send the-font-list find-or-create-font 6 " Gill Sans" 'swiss 'normal 'bold))
(when color? (send dc set-text-foreground (send the-color-database find-color "purple")))
(send dc draw-text str (+ 0 dx) (- height dy) #f 0 (* pi 1/4))))
(define-values (tw th _1 _2) (send dc get-text-extent "@"))
(when color?
(send dc set-text-foreground (send the-color-database find-color "gray")))
(send dc draw-text "@" (- (/ width 2) (/ tw 2)) (- (/ height 2) (/ th 2)))
(send dc set-font (send the-font-list find-or-create-font 6 " Gill Sans" 'swiss 'normal 'bold))
(when color?
(send dc set-text-foreground (send the-color-database find-color "purple")))
(send dc draw-text str (+ 0 dx) (- height dy) #f 0 (* pi 1/4)))

(define f (new frame% [label ""] [width 100] [height 100] [alignment '(center center)]))
(define c (new canvas%
Expand Down
31 changes: 14 additions & 17 deletions drracket/browser/private/bullet.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

(define bullet-size
(make-parameter
(let ([s (send (send (send (make-object text%) get-style-list) basic-style)
get-size)])
(let ([s (send+ (make-object text%) (get-style-list) (basic-style) (get-size))])
(max 7 (quotient s 2)))))

(define (get-bullet-width)
Expand Down Expand Up @@ -51,16 +50,15 @@
[(0) (values (lambda (x y w h) (send dc draw-ellipse x y w h)) #t)]
[(1) (values (lambda (x y w h) (send dc draw-ellipse x y w h)) #f)]
[else (values (lambda (x y w h) (send dc draw-rectangle x y w h)) #f)])])
(let ([b (send dc get-brush)])
(send dc set-brush
(if solid?
(send the-brush-list
find-or-create-brush
(send (send dc get-pen) get-color)
'solid)
transparent-brush))
(draw x y bsize bsize)
(send dc set-brush b)))))]
(define b (send dc get-brush))
(send dc set-brush
(if solid?
(send the-brush-list find-or-create-brush
(send (send dc get-pen) get-color)
'solid)
transparent-brush))
(draw x y bsize bsize)
(send dc set-brush b))))]
[define/override copy
(lambda ()
(make-object bullet-snip% depth))]
Expand All @@ -69,11 +67,10 @@
(send stream put depth))]
[define/override get-text
(lambda (offset num flattened?)
(if (< num 1)
""
(if flattened?
"* "
"*")))]
(cond
[(< num 1) ""]
[flattened? "* "]
[else "*"]))]
(super-new)
(set-snipclass bullet-snip-class)
(set-count 1)))
Expand Down
2 changes: 1 addition & 1 deletion drracket/browser/private/entity-names.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,6 @@
(euro . 8364)))

(define (entity-name->integer s)
(hash-ref table s (lambda () #f)))
(hash-ref table s #f))


Loading