Skip to content

Commit

Permalink
changes to types that match recent push to racket/draw
Browse files Browse the repository at this point in the history
related to racket/htdp#105
  • Loading branch information
rfindler committed Sep 7, 2020
1 parent 707ca12 commit 8b85373
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions typed-racket-more/typed/racket/draw.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
[-LoadFileKind (Un (-inst (parse-type #'Color%)) (-val #f)) Univ]
#:backing-scale -Real #f
#:try-@2x? Univ #f
#:get-data-from-file? Univ #f
(-inst (parse-type #'Bitmap%)))]
[recorded-datum->procedure
(-> Univ (-> (-inst (parse-type #'DC<%>)) -Void))]
Expand Down
16 changes: 11 additions & 5 deletions typed-racket-more/typed/racket/private/gui-types.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,30 @@
(List (U Path-String Input-Port)
Any (Option (Instance Color%)) Any
Real)
(List (U Path-String Input-Port)
Any (Option (Instance Color%)) Any
Real
Any)
(List Bytes Integer Integer)))
[get-argb-pixels
(->* [Real Real Exact-Nonnegative-Integer Exact-Nonnegative-Integer Bytes]
[Any Any #:unscaled? Any]
Void)]
[get-backing-scale (-> Positive-Real)]
[get-data-from-file (-> (Option (Vector LoadFileKind (Option (Instance Color%)) Bytes)))]
[get-depth (-> Exact-Nonnegative-Integer)]
[get-handle (-> Any)]
[get-height (-> Exact-Positive-Integer)]
[get-loaded-mask (-> (Option (Instance Bitmap%)))]
[get-width (-> Exact-Positive-Integer)]
[has-alpha-channel? (-> Boolean)]
[is-color? (-> Boolean)]
[load-file (case->
((U String Path Input-Port) -> Boolean)
((U String Path Input-Port) LoadFileKind -> Boolean)
((U String Path Input-Port) LoadFileKind (Option (Instance Color%)) -> Boolean)
((U String Path Input-Port) LoadFileKind (Option (Instance Color%)) Any -> Boolean))]
[load-file (->* ((U String Path Input-Port))
(LoadFileKind
(Option (Instance Color%))
Any
#:save-data-from-file? Any)
Boolean)]
[make-dc (-> (Instance Bitmap-DC%))]
[ok? (-> Boolean)]
[save-file (case->
Expand Down

0 comments on commit 8b85373

Please sign in to comment.