fix contract and docs for `register-collecting-blit'
original commit: 983188e07dce7ff28c1839183c6978963581b1c8
This commit is contained in:
parent
4ad4792778
commit
f065acb797
|
@ -321,10 +321,10 @@ Equivalent to @racket[(integer-in 1 1000000)].}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(register-collecting-blit [canvas (is-a?/c canvas%)]
|
@defproc[(register-collecting-blit [canvas (is-a?/c canvas%)]
|
||||||
[x real?]
|
[x position-integer?]
|
||||||
[y real?]
|
[y position-integer?]
|
||||||
[w (and/c real? (not/c negative?))]
|
[w dimension-integer?]
|
||||||
[h (and/c real? (not/c negative?))]
|
[h dimension-integer?]
|
||||||
[on (is-a?/c bitmap%)]
|
[on (is-a?/c bitmap%)]
|
||||||
[off (is-a?/c bitmap%)]
|
[off (is-a?/c bitmap%)]
|
||||||
[on-x real? 0]
|
[on-x real? 0]
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
[(canvas x y w h on off on-x on-y) (register-collecting-blit canvas x y w h on off on-x on-y 0 0)]
|
[(canvas x y w h on off on-x on-y) (register-collecting-blit canvas x y w h on off on-x on-y 0 0)]
|
||||||
[(canvas x y w h on off on-x on-y off-x) (register-collecting-blit canvas x y w h on off on-x on-y off-x 0)]
|
[(canvas x y w h on off on-x on-y off-x) (register-collecting-blit canvas x y w h on off on-x on-y off-x 0)]
|
||||||
[(canvas x y w h on off on-x on-y off-x off-y)
|
[(canvas x y w h on off on-x on-y off-x off-y)
|
||||||
|
(define (check-real who v)
|
||||||
|
(unless (real? v) (raise-argument-error who "real?" v)))
|
||||||
(check-instance 'register-collecting-blit canvas% 'canvas% #f canvas)
|
(check-instance 'register-collecting-blit canvas% 'canvas% #f canvas)
|
||||||
(check-position 'register-collecting-blit x)
|
(check-position 'register-collecting-blit x)
|
||||||
(check-position 'register-collecting-blit y)
|
(check-position 'register-collecting-blit y)
|
||||||
|
@ -36,10 +38,10 @@
|
||||||
(check-dimension 'register-collecting-blit h)
|
(check-dimension 'register-collecting-blit h)
|
||||||
(check-instance 'register-collecting-blit wx:bitmap% 'bitmap% #f on)
|
(check-instance 'register-collecting-blit wx:bitmap% 'bitmap% #f on)
|
||||||
(check-instance 'register-collecting-blit wx:bitmap% 'bitmap% #f off)
|
(check-instance 'register-collecting-blit wx:bitmap% 'bitmap% #f off)
|
||||||
(check-position 'register-collecting-blit on-x)
|
(check-real 'register-collecting-blit on-x)
|
||||||
(check-position 'register-collecting-blit on-y)
|
(check-real 'register-collecting-blit on-y)
|
||||||
(check-position 'register-collecting-blit off-x)
|
(check-real 'register-collecting-blit off-x)
|
||||||
(check-position 'register-collecting-blit off-y)
|
(check-real 'register-collecting-blit off-y)
|
||||||
(wx:register-collecting-blit (mred->wx canvas) x y w h on off on-x on-y off-x off-y)]))
|
(wx:register-collecting-blit (mred->wx canvas) x y w h on off on-x on-y off-x off-y)]))
|
||||||
|
|
||||||
(define unregister-collecting-blit
|
(define unregister-collecting-blit
|
||||||
|
|
Loading…
Reference in New Issue
Block a user