diff --git a/collects/scribblings/slideshow/picts.scrbl b/collects/scribblings/slideshow/picts.scrbl index 733e5145c3..83e68d0ea5 100644 --- a/collects/scribblings/slideshow/picts.scrbl +++ b/collects/scribblings/slideshow/picts.scrbl @@ -1125,6 +1125,10 @@ relative to the balloon's top-left corner.} The default background color for a balloon. +@defboolparam[balloon-enable-3d on?]{ + +A parameter that determines whether balloons are drawn with 3-D shading.} + @; ---------------------------------------- @subsection{Face} diff --git a/collects/texpict/balloon.rkt b/collects/texpict/balloon.rkt index 49e1d2a803..5f8b8e7141 100644 --- a/collects/texpict/balloon.rkt +++ b/collects/texpict/balloon.rkt @@ -14,7 +14,8 @@ balloon-pict balloon-point-x balloon-point-y - balloon-color) + balloon-color + balloon-enable-3d) (define-struct balloon (pict point-x point-y)) @@ -22,8 +23,12 @@ (define no-brush (find-brush "white" 'transparent)) (define black-pen (find-pen "black")) + (define balloon-enable-3d (make-parameter #t (lambda (x) (and x #t)))) + (define (series dc steps start-c end-c f pen? brush?) - (color-series dc steps #e0.5 start-c end-c f pen? brush?)) + (if (balloon-enable-3d) + (color-series dc steps #e0.5 start-c end-c f pen? brush?) + (color-series dc 0 0 start-c end-c f pen? brush?))) (define (mk-balloon w h corner-radius spike-pos dx dy [color balloon-color]) @@ -122,9 +127,10 @@ (if (string? color) (make-object color% color) color) (lambda (i) (draw-once i #t)) #t #t) - (send dc set-brush no-brush) - (send dc set-pen (find-pen dark-color 0.5)) - (draw-once 0 #f) + (when (balloon-enable-3d) + (send dc set-brush no-brush) + (send dc set-pen (find-pen dark-color 0.5)) + (draw-once 0 #f)) (send dc set-pen p) (send dc set-brush b))) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index ecc83e7740..84a6cafc1a 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,5 +1,6 @@ Version 5.3.3.7 Added module-compiled-cross-phase-persistent? +slideshow/balloon: add balloon-enable-3d Version 5.3.3.6 Added "phase-collapse" module inference and instantiation