fix bitmap% load-file' method and remove
{get,set}-gl-config'
Closes PR 11460
This commit is contained in:
parent
c6ae7377a5
commit
f245b6ca29
|
@ -221,11 +221,11 @@
|
||||||
(define locked 0)
|
(define locked 0)
|
||||||
(define/public (adjust-lock delta) (set! locked (+ locked delta)))
|
(define/public (adjust-lock delta) (set! locked (+ locked delta)))
|
||||||
|
|
||||||
(def/public (load-bitmap [(make-alts path-string? input-port?) in]
|
(def/public (load-file [(make-alts path-string? input-port?) in]
|
||||||
[bitmap-file-kind-symbol? [kind 'unknown]]
|
[bitmap-file-kind-symbol? [kind 'unknown]]
|
||||||
[(make-or-false color%) [bg #f]]
|
[(make-or-false color%) [bg #f]]
|
||||||
[any? [complain-on-failure? #f]])
|
[any? [complain-on-failure? #f]])
|
||||||
(check-alternate 'load-bitmap)
|
(check-alternate 'load-file)
|
||||||
(release-bitmap-storage)
|
(release-bitmap-storage)
|
||||||
(set!-values (s b&w?) (do-load-bitmap in kind bg complain-on-failure?))
|
(set!-values (s b&w?) (do-load-bitmap in kind bg complain-on-failure?))
|
||||||
(set! width (if s (cairo_image_surface_get_width s) 0))
|
(set! width (if s (cairo_image_surface_get_width s) 0))
|
||||||
|
|
|
@ -83,14 +83,6 @@ monochrome bitmap and @racket[32] for a color bitmap. See also
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-gl-config [config (is-a?/c gl-config%)])
|
|
||||||
void?]{
|
|
||||||
|
|
||||||
Returns a copy of this bitmap's requested OpenGL configuration. See
|
|
||||||
also @method[bitmap% set-gl-config].
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@defmethod[(get-height)
|
@defmethod[(get-height)
|
||||||
exact-positive-integer?]{
|
exact-positive-integer?]{
|
||||||
|
|
||||||
|
@ -282,18 +274,6 @@ bitmap does not have to be selected into the DC.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-gl-config [config (is-a?/c gl-config%)])
|
|
||||||
void?]{
|
|
||||||
|
|
||||||
Sets the requested OpenGL configuration for this bitmap. The
|
|
||||||
configuration is used when the bitmap selected into a drawing
|
|
||||||
context, and then a GL context is created for the drawing context.
|
|
||||||
|
|
||||||
The given @scheme[gl-config%] object is copied, so that changes to
|
|
||||||
the object do not affect the bitmap's configuration.
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@defmethod[(set-loaded-mask [mask (is-a?/c bitmap%)])
|
@defmethod[(set-loaded-mask [mask (is-a?/c bitmap%)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
A @scheme[gl-config%] object encapsulates configuration information
|
A @scheme[gl-config%] object encapsulates configuration information
|
||||||
for an OpenGL drawing context. Use a @scheme[gl-config%] object as an
|
for an OpenGL drawing context. Use a @scheme[gl-config%] object as an
|
||||||
initialization argument for @scheme[canvas%], or provide it to
|
initialization argument for @scheme[canvas%] or provide it to
|
||||||
@xmethod[bitmap% set-gl-config].
|
@racket[make-gl-bitmap].
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[()]{
|
@defconstructor[()]{
|
||||||
|
|
|
@ -42,7 +42,9 @@ alphas; for example, drawing a line in the middle of an empty bitmap
|
||||||
produces an image with non-zero alpha only at the drawn line.
|
produces an image with non-zero alpha only at the drawn line.
|
||||||
|
|
||||||
Only bitmaps created with the new `make-gl-bitmap' function support
|
Only bitmaps created with the new `make-gl-bitmap' function support
|
||||||
OpenGL drawing.
|
OpenGL drawing. The `make-gl-bitmap' function takes a `gl-config%' as
|
||||||
|
an argument, and the `get-gl-config' and `set-gl-config' methods of
|
||||||
|
`bitmap%' have been removed.
|
||||||
|
|
||||||
Use the new `make-bitmap', `read-bitmap', `make-monochrome-bitmap',
|
Use the new `make-bitmap', `read-bitmap', `make-monochrome-bitmap',
|
||||||
`make-screen-bitmap', and `make-gl-bitmap' functions to create
|
`make-screen-bitmap', and `make-gl-bitmap' functions to create
|
||||||
|
|
Loading…
Reference in New Issue
Block a user