From 3e46c52c2c40154027b23dbd549508030b514066 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 1 Dec 2005 20:49:45 +0000 Subject: [PATCH] fix text part of label when it goes to the edge (or slightly outside) the bounding box svn: r1466 --- collects/mrlib/bitmap-label.ss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/collects/mrlib/bitmap-label.ss b/collects/mrlib/bitmap-label.ss index 7c36fbfbc7..f9d7e0c1aa 100644 --- a/collects/mrlib/bitmap-label.ss +++ b/collects/mrlib/bitmap-label.ss @@ -86,10 +86,11 @@ (send bitmap-dc clear) (send bitmap-dc set-pen (send the-pen-list find-or-create-pen "black" 1 'solid)) (send bitmap-dc set-brush (send the-brush-list find-or-create-brush "black" 'solid)) + ;; Black rectangle to be masked by text: (send bitmap-dc draw-rectangle - (+ outside-margin img-width middle-margin) - (- (/ new-height 2) (/ height 2)) - width height) + (sub1 (+ outside-margin img-width middle-margin)) + 0 + (add1 width) new-height) (send bitmap-dc draw-bitmap img-bitmap outside-margin