Update racket/draw contracts.
This commit is contained in:
parent
94a837fcc8
commit
f13d9a56d2
|
@ -45,6 +45,10 @@
|
||||||
'xor-dot 'xor-long-dash 'xor-short-dash
|
'xor-dot 'xor-long-dash 'xor-short-dash
|
||||||
'xor-dot-dash))
|
'xor-dot-dash))
|
||||||
|
|
||||||
|
(define transformation-vector/c
|
||||||
|
(vector/c (vector/c real? real? real? real? real? real?)
|
||||||
|
real? real? real? real? real?))
|
||||||
|
|
||||||
|
|
||||||
(define dc<%>/c
|
(define dc<%>/c
|
||||||
(class/c
|
(class/c
|
||||||
|
@ -198,9 +202,8 @@
|
||||||
(green (->m (integer-in 0 255)))
|
(green (->m (integer-in 0 255)))
|
||||||
(copy-from (->m (is-a?/c color%) (is-a?/c color%)))
|
(copy-from (->m (is-a?/c color%) (is-a?/c color%)))
|
||||||
(ok? (->m boolean?))
|
(ok? (->m boolean?))
|
||||||
(set (->m (integer-in 0 255)
|
(set (->*m (byte? byte? byte?)
|
||||||
(integer-in 0 255)
|
((real-in 0 1))
|
||||||
(integer-in 0 255)
|
|
||||||
void?))))
|
void?))))
|
||||||
|
|
||||||
(define point%/c
|
(define point%/c
|
||||||
|
@ -266,7 +269,9 @@
|
||||||
(integer-in 0 255)
|
(integer-in 0 255)
|
||||||
(integer-in 0 255)
|
(integer-in 0 255)
|
||||||
void?)))
|
void?)))
|
||||||
(set-stipple (->m (or/c (is-a?/c bitmap%) false/c) void?))
|
(set-stipple (->*m ((or/c (is-a?/c bitmap%) #f))
|
||||||
|
((or/c transformation-vector/c #f))
|
||||||
|
void?))
|
||||||
(set-style (->m brush-style/c void?))))
|
(set-style (->m brush-style/c void?))))
|
||||||
|
|
||||||
(define brush-list%/c
|
(define brush-list%/c
|
||||||
|
@ -305,30 +310,34 @@
|
||||||
(class/c
|
(class/c
|
||||||
(init [bitmap (or/c (is-a?/c bitmap%) #f)])
|
(init [bitmap (or/c (is-a?/c bitmap%) #f)])
|
||||||
[draw-bitmap-section-smooth
|
[draw-bitmap-section-smooth
|
||||||
(->m (is-a?/c bitmap%)
|
(->*m ((is-a?/c bitmap%)
|
||||||
real? real?
|
real? real?
|
||||||
(and/c real? (not/c negative?))
|
(and/c real? (not/c negative?))
|
||||||
(and/c real? (not/c negative?))
|
(and/c real? (not/c negative?))
|
||||||
real? real?
|
real? real?
|
||||||
(and/c real? (not/c negative?))
|
(and/c real? (not/c negative?))
|
||||||
(and/c real? (not/c negative?))
|
(and/c real? (not/c negative?)))
|
||||||
(or/c (is-a?/c bitmap%) #f)
|
((one-of/c 'solid 'opaque 'xor)
|
||||||
|
(or/c (is-a?/c color%) #f)
|
||||||
|
(or/c (is-a?/c bitmap%) #f))
|
||||||
boolean?)]
|
boolean?)]
|
||||||
[get-argb-pixels
|
[get-argb-pixels
|
||||||
(->*m (real? real?
|
(->*m (exact-nonnegative-integer?
|
||||||
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
(and/c bytes? (not/c immutable?)))
|
(and/c bytes? (not/c immutable?)))
|
||||||
(any/c)
|
(any/c any/c)
|
||||||
void?)]
|
void?)]
|
||||||
[get-bitmap (->m (or/c (is-a?/c bitmap%) #f))]
|
[get-bitmap (->m (or/c (is-a?/c bitmap%) #f))]
|
||||||
[get-pixel (->m real? real? (is-a?/c color%) boolean?)]
|
[get-pixel (->m real? real? (is-a?/c color%) boolean?)]
|
||||||
[set-argb-pixels
|
[set-argb-pixels
|
||||||
(->*m (real? real?
|
(->*m (exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
bytes?)
|
exact-nonnegative-integer?
|
||||||
(any/c)
|
(and/c bytes? (not/c immutable?)))
|
||||||
|
(any/c any/c)
|
||||||
void?)]
|
void?)]
|
||||||
[set-bitmap (->m (or/c (is-a?/c bitmap%) #f) void?)]
|
[set-bitmap (->m (or/c (is-a?/c bitmap%) #f) void?)]
|
||||||
[set-pixel (->m real? real? (is-a?/c color%) void?)])))
|
[set-pixel (->m real? real? (is-a?/c color%) void?)])))
|
||||||
|
@ -398,7 +407,8 @@
|
||||||
real?
|
real?
|
||||||
(one-of/c 'odd-even 'winding))
|
(one-of/c 'odd-even 'winding))
|
||||||
void?))
|
void?))
|
||||||
(set-polygon (->*m ((listof (is-a?/c point%)))
|
(set-polygon (->*m ((or/c (listof (is-a?/c point%))
|
||||||
|
(listof (cons/c real? real?))))
|
||||||
(real?
|
(real?
|
||||||
real?
|
real?
|
||||||
(one-of/c 'odd-even 'winding))
|
(one-of/c 'odd-even 'winding))
|
||||||
|
@ -423,8 +433,8 @@
|
||||||
(append (->m (is-a?/c dc-path%) void?))
|
(append (->m (is-a?/c dc-path%) void?))
|
||||||
(arc (->*m (real?
|
(arc (->*m (real?
|
||||||
real?
|
real?
|
||||||
(and/c real? (not/c negative?))
|
real?
|
||||||
(and/c real? (not/c negative?))
|
real?
|
||||||
real?
|
real?
|
||||||
real?)
|
real?)
|
||||||
(any/c)
|
(any/c)
|
||||||
|
@ -438,7 +448,8 @@
|
||||||
void?))
|
void?))
|
||||||
(get-bounding-box (->m (values real? real? real? real?)))
|
(get-bounding-box (->m (values real? real? real? real?)))
|
||||||
(line-to (->m real? real? void?))
|
(line-to (->m real? real? void?))
|
||||||
(lines (->*m ((listof (is-a?/c point%)))
|
(lines (->*m ((or/c (listof (is-a?/c point%))
|
||||||
|
(listof (cons/c real? real?))))
|
||||||
(real? real?)
|
(real? real?)
|
||||||
void?))
|
void?))
|
||||||
(move-to (->m real? real? void?))
|
(move-to (->m real? real? void?))
|
||||||
|
@ -458,6 +469,13 @@
|
||||||
(real?)
|
(real?)
|
||||||
void?))
|
void?))
|
||||||
(scale (->m real? real? void?))
|
(scale (->m real? real? void?))
|
||||||
|
(text-outline (->*m ((is-a?/c font%)
|
||||||
|
string?
|
||||||
|
real? real?)
|
||||||
|
(any/c)
|
||||||
|
void?))
|
||||||
|
(transform (->m (vector/c real? real? real? real? real? real?)
|
||||||
|
void?))
|
||||||
(translate (->m real? real? void?))))
|
(translate (->m real? real? void?))))
|
||||||
|
|
||||||
(define gl-config%/c
|
(define gl-config%/c
|
||||||
|
@ -478,8 +496,8 @@
|
||||||
(define bitmap%/c
|
(define bitmap%/c
|
||||||
(class/c
|
(class/c
|
||||||
(get-argb-pixels (->*m
|
(get-argb-pixels (->*m
|
||||||
(real?
|
(exact-nonnegative-integer?
|
||||||
real?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
(and/c bytes? (not/c immutable?)))
|
(and/c bytes? (not/c immutable?)))
|
||||||
|
@ -507,8 +525,8 @@
|
||||||
((integer-in 0 100))
|
((integer-in 0 100))
|
||||||
boolean?))
|
boolean?))
|
||||||
(set-argb-pixels (->*m
|
(set-argb-pixels (->*m
|
||||||
(real?
|
(exact-nonnegative-integer?
|
||||||
real?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
exact-nonnegative-integer?
|
exact-nonnegative-integer?
|
||||||
bytes?)
|
bytes?)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user