update docs for `register-collecting-blit'
original commit: 79728fad59fbc3cb1d40e4875d703e92a4da2991
This commit is contained in:
parent
10762db8c3
commit
e1baebd20e
|
@ -57,44 +57,3 @@ Returns @scheme[#t] if the main display has color, @scheme[#f]
|
|||
otherwise.
|
||||
|
||||
}
|
||||
|
||||
@defproc[(register-collecting-blit [canvas (is-a?/c canvas%)]
|
||||
[x real?]
|
||||
[y real?]
|
||||
[w (and/c real? (not/c negative?))]
|
||||
[h (and/c real? (not/c negative?))]
|
||||
[on (is-a?/c bitmap%)]
|
||||
[off (is-a?/c bitmap%)]
|
||||
[on-x real? 0]
|
||||
[on-y real? 0]
|
||||
[off-x real? 0]
|
||||
[off-y real? 0])
|
||||
void?]{
|
||||
|
||||
Registers a blit to occur when garbage collection starts or ends.
|
||||
|
||||
When garbage collection starts, @scheme[(send (send canvas #,(::
|
||||
canvas<%> get-dc)) #,(:: dc<%> draw-bitmap-section) on on-x on-y x y w
|
||||
h)] is called. When garbage collection ends, @scheme[(send (send
|
||||
canvas #,(:: canvas<%> get-dc)) #,(:: dc<%> draw-bitmap-section) off
|
||||
off-x off-y x y w h)] is called. If @scheme[canvas]'s device context
|
||||
has a scale, the scale may or may not be temporarily disabled during
|
||||
the bitmap drawing.
|
||||
|
||||
The @scheme[canvas] is registered weakly, so it will be automatically
|
||||
unregistered if the canvas becomes invisible and inaccessible.
|
||||
Multiple registrations can be installed for the same canvas.
|
||||
|
||||
See also @scheme[unregister-collecting-blit].
|
||||
|
||||
}
|
||||
|
||||
@defproc[(unregister-collecting-blit [canvas (is-a?/c canvas%)])
|
||||
void?]{
|
||||
|
||||
Unregisters a blit request installed with See also
|
||||
@scheme[register-collecting-blit].
|
||||
|
||||
Unregisters all blits for @scheme[canvas].
|
||||
|
||||
}
|
||||
|
|
|
@ -317,11 +317,49 @@ Under X, the function invokes an external sound-playing program;
|
|||
Under Mac OS X, Quicktime is used to play sounds; most sound
|
||||
formats (.wav, .aiff, .mp3) are supported in recent versions of
|
||||
Quicktime. In order to play .wav files, Quicktime 3.0 (compatible
|
||||
with OS 7.5 and up) is required.
|
||||
with OS 7.5 and up) is required.}
|
||||
|
||||
|
||||
@defproc[(register-collecting-blit [canvas (is-a?/c canvas%)]
|
||||
[x real?]
|
||||
[y real?]
|
||||
[w (and/c real? (not/c negative?))]
|
||||
[h (and/c real? (not/c negative?))]
|
||||
[on (is-a?/c bitmap%)]
|
||||
[off (is-a?/c bitmap%)]
|
||||
[on-x real? 0]
|
||||
[on-y real? 0]
|
||||
[off-x real? 0]
|
||||
[off-y real? 0])
|
||||
void?]{
|
||||
|
||||
}
|
||||
Registers a ``blit'' to occur when garbage collection starts and
|
||||
ends. When garbage collection starts, @racket[on] is drawn at
|
||||
location @racket[x] and @racket[y] within @racket[canvas], if
|
||||
@racket[canvas] is shown. When garbage collection ends, the drawing
|
||||
is reverted. The @racket[off], @racket[off-x], and @racket[off-y]
|
||||
arguments are currently unused, though they were formerly used to
|
||||
revert the drawing of @racket[on].
|
||||
|
||||
The background behind @racket[on] is unspecified, so @racket[on]
|
||||
should be a solid image, and the canvas's scale or scrolling is not
|
||||
applied to the drawing. Only the portion of @racket[on] within
|
||||
@racket[w] and @racket[h] pixels is used; if @racket[on-x] and
|
||||
@racket[on-y] are specified, they specify an offset within the bitmap
|
||||
that is used for drawing.
|
||||
|
||||
The blit is automatically unregistered if @scheme[canvas] becomes
|
||||
invisible and inaccessible. Multiple registrations can be installed
|
||||
for the same @scheme[canvas].
|
||||
|
||||
See also @scheme[unregister-collecting-blit].}
|
||||
|
||||
|
||||
@defproc[(unregister-collecting-blit [canvas (is-a?/c canvas%)])
|
||||
void?]{
|
||||
|
||||
Unregisters all blit requests installed for @racket[canvas] with
|
||||
@scheme[register-collecting-blit].}
|
||||
|
||||
|
||||
@defproc[(send-event [receiver-bytes (lambda (s) (and (bytes? s)
|
||||
|
|
Loading…
Reference in New Issue
Block a user