Skip to content

Commit

Permalink
Create bitmaps using an alpha channel (#96)
Browse files Browse the repository at this point in the history
As part of #90, calls to `(make-bitmap ...)` were replaced with `(make-object
bitmap% ...)` but the two calls have different defaults for whether to create
an alpha channel for the bitmap or not. The `(make-object bitmap% ...)`
variant defaults to not having an alpha channel, so it needs to be explicitly
specified.
  • Loading branch information
alex-hhh committed Jun 7, 2021
1 parent c412600 commit 6743d6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plot-lib/plot/private/no-gui/plot2d.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#:aspect-ratio [aspect-ratio (plot-aspect-ratio)]
#:legend-anchor [legend-anchor (plot-legend-anchor)])
(define bm : (Instance (Class #:implements Bitmap% #:implements Plot-Metrics<%>))
(make-object (plot-metrics-mixin bitmap%) (λ () pm) width height))
(make-object (plot-metrics-mixin bitmap%) (λ () pm) width height #f #t))
(define dc : (Instance DC<%>) (make-object bitmap-dc% bm))
(define pm : (Instance Plot-Metrics<%>)
(plot/dc renderer-tree dc 0 0 width height
Expand Down
2 changes: 1 addition & 1 deletion plot-lib/plot/private/no-gui/plot3d.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
#:aspect-ratio [aspect-ratio (plot-aspect-ratio)]
#:legend-anchor [legend-anchor (plot-legend-anchor)])
(define bm : (Instance (Class #:implements Bitmap% #:implements Plot-Metrics<%>))
(make-object (plot-metrics-mixin (class bitmap% (super-new))) (λ () pm) width height))
(make-object (plot-metrics-mixin (class bitmap% (super-new))) (λ () pm) width height #f #t))
(define dc : (Instance DC<%>) (make-object bitmap-dc% bm))
(define pm : (Instance Plot-Metrics<%>)
(plot3d/dc renderer-tree dc 0 0 width height
Expand Down

0 comments on commit 6743d6b

Please sign in to comment.