Skip to content

Commit 8b85373

Browse files
committed
changes to types that match recent push to racket/draw
related to racket/htdp#105
1 parent 707ca12 commit 8b85373

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

typed-racket-more/typed/racket/draw.rkt

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
[-LoadFileKind (Un (-inst (parse-type #'Color%)) (-val #f)) Univ]
162162
#:backing-scale -Real #f
163163
#:try-@2x? Univ #f
164+
#:get-data-from-file? Univ #f
164165
(-inst (parse-type #'Bitmap%)))]
165166
[recorded-datum->procedure
166167
(-> Univ (-> (-inst (parse-type #'DC<%>)) -Void))]

typed-racket-more/typed/racket/private/gui-types.rkt

+11-5
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,30 @@
6363
(List (U Path-String Input-Port)
6464
Any (Option (Instance Color%)) Any
6565
Real)
66+
(List (U Path-String Input-Port)
67+
Any (Option (Instance Color%)) Any
68+
Real
69+
Any)
6670
(List Bytes Integer Integer)))
6771
[get-argb-pixels
6872
(->* [Real Real Exact-Nonnegative-Integer Exact-Nonnegative-Integer Bytes]
6973
[Any Any #:unscaled? Any]
7074
Void)]
7175
[get-backing-scale (-> Positive-Real)]
76+
[get-data-from-file (-> (Option (Vector LoadFileKind (Option (Instance Color%)) Bytes)))]
7277
[get-depth (-> Exact-Nonnegative-Integer)]
7378
[get-handle (-> Any)]
7479
[get-height (-> Exact-Positive-Integer)]
7580
[get-loaded-mask (-> (Option (Instance Bitmap%)))]
7681
[get-width (-> Exact-Positive-Integer)]
7782
[has-alpha-channel? (-> Boolean)]
7883
[is-color? (-> Boolean)]
79-
[load-file (case->
80-
((U String Path Input-Port) -> Boolean)
81-
((U String Path Input-Port) LoadFileKind -> Boolean)
82-
((U String Path Input-Port) LoadFileKind (Option (Instance Color%)) -> Boolean)
83-
((U String Path Input-Port) LoadFileKind (Option (Instance Color%)) Any -> Boolean))]
84+
[load-file (->* ((U String Path Input-Port))
85+
(LoadFileKind
86+
(Option (Instance Color%))
87+
Any
88+
#:save-data-from-file? Any)
89+
Boolean)]
8490
[make-dc (-> (Instance Bitmap-DC%))]
8591
[ok? (-> Boolean)]
8692
[save-file (case->

0 commit comments

Comments
 (0)