got rid of some uses of collection-path
original commit: 83cde5c8fb7ba7dd6bd76a8cf239022f214182d9
This commit is contained in:
commit
70fbd8e5b9
|
@ -226,7 +226,7 @@
|
||||||
(field
|
(field
|
||||||
[funny-value 0]
|
[funny-value 0]
|
||||||
[funny-bitmap
|
[funny-bitmap
|
||||||
(make-object bitmap% (build-path (collection-path "icons") "touch.bmp"))]
|
(make-object bitmap% (collection-file-path "touch.bmp" "icons"))]
|
||||||
[max-value 1])
|
[max-value 1])
|
||||||
|
|
||||||
(define/public (get-range) max-value)
|
(define/public (get-range) max-value)
|
||||||
|
|
|
@ -947,32 +947,13 @@ the mask bitmap and the original bitmap are all together in a single bytes!
|
||||||
(color-blue color))))
|
(color-blue color))))
|
||||||
|
|
||||||
|
|
||||||
(define pen-ht (make-hash))
|
|
||||||
|
|
||||||
(define (pen->pen-obj/cache pen)
|
(define (pen->pen-obj/cache pen)
|
||||||
(cond
|
|
||||||
[(and (equal? 'round (pen-join pen))
|
|
||||||
(equal? 'round (pen-cap pen)))
|
|
||||||
(send the-pen-list find-or-create-pen
|
(send the-pen-list find-or-create-pen
|
||||||
(pen-color pen)
|
(pen-color pen)
|
||||||
(pen-width pen)
|
(pen-width pen)
|
||||||
(pen-style pen))]
|
(pen-style pen)
|
||||||
[else
|
(pen-cap pen)
|
||||||
(let* ([wb/f (hash-ref pen-ht pen #f)]
|
(pen-join pen)))
|
||||||
[pen-obj/f (and (weak-box? wb/f) (weak-box-value wb/f))])
|
|
||||||
(or pen-obj/f
|
|
||||||
(let ([pen-obj (pen->pen-obj pen)])
|
|
||||||
(hash-set! pen-ht pen (make-weak-box pen-obj))
|
|
||||||
pen-obj)))]))
|
|
||||||
|
|
||||||
(define (pen->pen-obj pen)
|
|
||||||
(let ([ans (make-object pen%
|
|
||||||
(pen-color pen)
|
|
||||||
(pen-width pen)
|
|
||||||
(pen-style pen))])
|
|
||||||
(send ans set-cap (pen-cap pen))
|
|
||||||
(send ans set-join (pen-join pen))
|
|
||||||
ans))
|
|
||||||
|
|
||||||
(define (to-img arg)
|
(define (to-img arg)
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in New Issue
Block a user