From 0dc9b5d3ccb41da188ca8d3d49f4f881f72e4e75 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 8 Feb 2000 03:00:51 +0000 Subject: [PATCH] . original commit: e6dcbdc566e225c336ed8b57805f08afc3d05129 --- collects/tests/mred/draw-info.txt | 8 ++++++++ collects/tests/mred/draw.ss | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/collects/tests/mred/draw-info.txt b/collects/tests/mred/draw-info.txt index 982bcb72..3b2f03af 100644 --- a/collects/tests/mred/draw-info.txt +++ b/collects/tests/mred/draw-info.txt @@ -121,6 +121,14 @@ The drawing area should have the following features: Short Dash line Dot Dash line + Long line: On the screen, the line should be 1 pixel wide, except + that the last 1/9th should be two pixels wide. In postscript, + the line should consist of 9 segments, growing in width from + 0.0 to 2.0 (inclusive) in 0.25 increments. When the image + is scaled by a factor of 2, the first 1/9th on the screen + should still be 1 pixel, the next 7/9ths should be 2 pixels, + and the last 1/9 should be 4 pixels wide. + The drawings under 2x2 should be reasonable extensions of the 0x0 and 1x1 pictures for a double-wide pen. diff --git a/collects/tests/mred/draw.ss b/collects/tests/mred/draw.ss index 6def0ff0..57203b25 100644 --- a/collects/tests/mred/draw.ss +++ b/collects/tests/mred/draw.ss @@ -565,6 +565,16 @@ (send pens set-style 'solid) (loop (cdr s) (+ y 8)))))) + (when (= flevel 2) + (let ([lens '(0 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0)]) + (let loop ([l lens][x 10]) + (unless (null? l) + (let ([p (make-object pen% "BLACK" (car l) 'solid)]) + (send dc set-pen p) + (send dc draw-line x 300 (+ x 19) 300) + (send dc set-pen pent) + (loop (cdr l) (+ x 20))))))) + (when (and last? (not (or ps? (eq? dc can-dc))) (send mem-dc get-bitmap)) (send can-dc draw-bitmap (send mem-dc get-bitmap) 0 0 'opaque)))