screen dc corrections and clarifications

original commit: 5ebfa781bdc4a6ee9bf41f01cef1c76dde36e78c
This commit is contained in:
Matthew Flatt 2010-09-15 16:31:04 -06:00
parent 1be1ffcda5
commit 02e931391d
3 changed files with 6 additions and 8 deletions

View File

@ -329,7 +329,7 @@
(define/public (get-dc) dc) (define/public (get-dc) dc)
(define/public (make-compatible-bitmap w h) (define/public (make-compatible-bitmap w h)
(send dc make-backing-bitmap w h #t)) (send dc make-backing-bitmap w h))
(define/override (get-client-gtk) client-gtk) (define/override (get-client-gtk) client-gtk)
(define/override (handles-events? gtk) (not (ptr-equal? gtk combo-button-gtk))) (define/override (handles-events? gtk) (not (ptr-equal? gtk combo-button-gtk)))

View File

@ -38,6 +38,7 @@
(define/override (ok?) #t) (define/override (ok?) #t)
(define/override (is-color?) #t) (define/override (is-color?) #t)
(define/override (has-alpha-channel?) #f)
(define/override (get-cairo-surface) s) (define/override (get-cairo-surface) s)
@ -80,15 +81,13 @@
(super-new) (super-new)
(define/override (make-backing-bitmap w h [any-bg? #f]) (define/override (make-backing-bitmap w h)
(cond (cond
[(and (eq? 'unix (system-type)) [(and (eq? 'unix (system-type))
(or any-bg? (send canvas get-canvas-background))
(send canvas get-canvas-background)))
(make-object x11-bitmap% w h (widget-window (send canvas get-client-gtk)))] (make-object x11-bitmap% w h (widget-window (send canvas get-client-gtk)))]
[(and (eq? 'windows (system-type)) [(and (eq? 'windows (system-type))
(or any-bg? (send canvas get-canvas-background))
(send canvas get-canvas-background)))
(make-object win32-bitmap% w h (widget-window (send canvas get-client-gtk)))] (make-object win32-bitmap% w h (widget-window (send canvas get-client-gtk)))]
[else [else
(super make-backing-bitmap w h)])) (super make-backing-bitmap w h)]))

View File

@ -294,8 +294,7 @@ environment of the result namespace.}
(is-a/c? bitmap%)]{ (is-a/c? bitmap%)]{
Creates a bitmap that draws in a way that is the same as drawing to a Creates a bitmap that draws in a way that is the same as drawing to a
canvas in its default configuration. The bitmap is always in color canvas in its default configuration.
with an alpha channel.
A normal @racket[bitmap%] draws in a more platform-independent way and A normal @racket[bitmap%] draws in a more platform-independent way and
may use fewer constrained resources, particularly under Windows.} may use fewer constrained resources, particularly under Windows.}