From 679e9ef2e0f5f3609533450df9002e4d3e01ab51 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Mar 2011 10:19:16 -0700 Subject: [PATCH] slideshow/pict: adjust `linewidth' to allow #f => transparent --- collects/scribblings/slideshow/picts.scrbl | 6 ++++-- collects/texpict/private/mrpict-extra.rkt | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/slideshow/picts.scrbl b/collects/scribblings/slideshow/picts.scrbl index 3f161c73a4..40298ed4de 100644 --- a/collects/scribblings/slideshow/picts.scrbl +++ b/collects/scribblings/slideshow/picts.scrbl @@ -498,10 +498,12 @@ drawing the original @racket[pict].} Creats a container picture that doesn't draw the child picture, but uses the child's size.} -@defproc[(linewidth [w real?] [pict pict?]) pict?]{ +@defproc[(linewidth [w (or/c real? #f)] [pict pict?]) pict?]{ Selects a specific pen width for drawing, which applies to pen drawing -for @racket[pict] that does not already use a specific pen width.} +for @racket[pict] that does not already use a specific pen width. +A @racket[#f] value for @racket[w] makes the pen transparent (in contrast +to a zero value, which means ``as thin as possible for the target device'').} @defproc[(colorize [pict pict?] [color (or/c string? (is-a?/c color%) diff --git a/collects/texpict/private/mrpict-extra.rkt b/collects/texpict/private/mrpict-extra.rkt index 262250fccb..6da0d3d8d4 100644 --- a/collects/texpict/private/mrpict-extra.rkt +++ b/collects/texpict/private/mrpict-extra.rkt @@ -425,7 +425,9 @@ (if (eq? (cadr x) 'thicklines) 1 0)) - 'solid)) + (if (eq? (cadr x) #f) + 'transparent + 'solid))) (loop dx dy (caddr x)) (set-pen p))] [(prog)