got rid of some uses of collection-path

original commit: 83cde5c8fb7ba7dd6bd76a8cf239022f214182d9
This commit is contained in:
Robby Findler 2010-07-25 15:15:57 -05:00
commit 70fbd8e5b9
2 changed files with 7 additions and 26 deletions

View File

@ -226,7 +226,7 @@
(field
[funny-value 0]
[funny-bitmap
(make-object bitmap% (build-path (collection-path "icons") "touch.bmp"))]
(make-object bitmap% (collection-file-path "touch.bmp" "icons"))]
[max-value 1])
(define/public (get-range) max-value)

View File

@ -947,32 +947,13 @@ the mask bitmap and the original bitmap are all together in a single bytes!
(color-blue color))))
(define pen-ht (make-hash))
(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
(pen-color pen)
(pen-width pen)
(pen-style pen))]
[else
(let* ([wb/f (hash-ref pen-ht pen #f)]
[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))
(send the-pen-list find-or-create-pen
(pen-color pen)
(pen-width pen)
(pen-style pen)
(pen-cap pen)
(pen-join pen)))
(define (to-img arg)
(cond