Permalink
Browse files

Improve type specifications for bitmap handling functions.

Fixes build issue.
  • Loading branch information...
1 parent 6edcc4b commit 630a77cea8337a899d7803adc1df1bc328ac2e12 @samth samth committed Oct 6, 2012
Showing with 17 additions and 2 deletions.
  1. +17 −2 collects/images/private/flomap.rkt
@@ -10,10 +10,25 @@
"flomap-composite.rkt"
"flomap-resize.rkt")
+;; This is a copy of the definition in typed/mred/mred
+;; but requiring that produces an error when building
+;; the docs
+(define-type Bitmap%
+ (Class (Real Real Boolean)
+ ()
+ ([get-width (-> Integer)]
+ [get-height (-> Integer)]
+ [get-argb-pixels
+ (case->
+ (Integer Integer Integer Integer Bytes Boolean
+ -> Void)
+ (Integer Integer Integer Integer Bytes Boolean Boolean
+ -> Void))])))
+
(require/typed
"flomap-convert.rkt"
- [bitmap->flomap (Any -> flomap)]
- [flomap->bitmap (flomap -> Any)]
+ [bitmap->flomap ((Instance Bitmap%) -> flomap)]
+ [flomap->bitmap (flomap -> (Instance Bitmap%))]
[draw-flomap ((Any -> Any) Integer Integer -> flomap)])
(provide (all-from-out "flomap-struct.rkt"

0 comments on commit 630a77c

Please sign in to comment.