original commit: 499a55fa442d9658dfb319a34f257de07c2ebc05
This commit is contained in:
Matthew Flatt 1998-10-03 17:05:49 +00:00
parent 4a3b1e3cb1
commit 38f131a449
2 changed files with 161 additions and 68 deletions

View File

@ -1,11 +1,10 @@
The drawing area should have the following features:
At the top-left, when the window is opened for the first time,
you shoudl see a hollow box with a line sticking out to the
bottom left. Repainting the canvas should produce instead
a solid box and no line. Repainting with Pixmap or Bitmap
should always produce the hollow box and line.
At the top-left, when the window is opened for the first time, you
shoudl see a hollow box with a line sticking out to the bottom
left. Repainting the canvas should produce instead a solid box and
no line. Repainting with Pixmap or Bitmap should always produce
the hollow box and line.
At the top, "Pen 0 x 0" in a consistent font (i.e., re-painting
should not change the font; clicking *2 should make it twice
@ -16,58 +15,96 @@ The drawing area should have the following features:
A line should appear across each of "Pen 0 x 0" and "Pen 1 x 1"
(if the line is missing, it was probably erased when the text
was repainted, and that is bad)
A little bit of a black line should appear before "Pen 2 x 2",
but the yellow background should have covered up the line
A little bit of a black line should appear before "Pen 2 x 2", but
the yellow background should have covered up the rest of the line
To the right of the Pen text, a black and red pair of splines should
form a squashed "S", twice as wide as high. The "S" is formed by
two splines.
To the far right should be three columns of boxes...
To the far right should be three columns of boxes. All boxes should
have a red border and lines on a background that matches the
normal background (i.e., either white or cyan). The lines should
be black for the left colum, and green for the remaining two
columns.
The drawings under 0x0 and 1x1 should look nearly the same:
TopLeft: h-line should be left-aligned with box below it,
but extend 1 extra pixel. v-line similarly should be
top-aligned and 1 pixel longer. The lines should not
The drawings under "0 x 0" and "1 x 1" should look nearly the same:
TopLeft: h-line should be left-aligned with box below it, but
extend 1 extra pixel. v-line similarly should be
top-aligned and 1 pixel longer. The lines should not
touch the box - there should be 2 pixels of space.
Top: Lines for the rotated L's should join in a sharp corner
Second from Top: like top-left, but lines should touch the box
(so only the vertical overhang is visible)
Second from top, right: For 0x0, the X should never be
more than 1 pixel wide; this is a case
where 1x1 may be different (i.e., it may
have areas two-pixels wide)
Four shape lines: First and second should be exactly the same
shape, with the first hollow and the second filled.
Third shape and all 2x2 shapes are ill-defined.
Second from Top: like top-left, but lines should touch the box (so
only the vertical overhang is visible)
Second from top, right: For 0x0, the X should never be more than 1
pixel wide; this is a case where 1x1 may
be different (i.e., it may have areas
two-pixels wide)
Four shape rows: First (solid brush, solid pen) and second (solid
brush, solid pen) columns should be the same shape, with
the first hollow and the second filled. Third (solid
brush, no pen) column should look like the second column.
The fourth column should be the xor of the first and
third columns. The precise results are ill-defined for
the "2 x 2 Pen" shapes.
Octagons: two hollow octagons exactly the same shape.
Dot (after octagons): a single pixel
Dot (after octagons): a single pixel (uses draw-point)
Another Dot (below the first one): a single pixel (created as a
0-length line from draw-line)
Line: actually two lines, but they should form a single
unbroken line
Arcs: The leftmost should be the top half of a circle (it's
form via two arcs); the rightmost should be a filled
wedge from 90 degrees to 180 degress
Arcs: The leftmost should be the top half of an ellipse (it's
formed via two arcs); the rightmost should be a filled wedge
from 90 degrees to 180 degress. The arcs are part of an
ellipse 40 tall and 30 wide (i.e., stretched slightly in the
vertical direction from a circle).
Big octagon: The octagon defines the region for octagin clipping.
Also, it's drawn in xor mode, so it should flip black to
white wherever the octagon line runs over the shapes of the
middle section. The bitmaps of the bottom region are drawn
afterwards, and wil therefore hide parts of the octagon
line, although the MrEd logo is also drawn in XOR mode so it
shouldn't obscure the octagon line.
Bottom section:
Images: MrEd logo (b & w)
Images: MrEd logo (b & w), drawn in XOR mode, so the octagin line
should be toggled where the black part of the MrEd logo
intersects with the line.
BB logo (color)
Down-left arrow with a thin horizontal line (b & w)
Down-left arrow - B & W, *not* red
Down-left arrow - red with white background
BB logo, possibly reddened
Down-left arrow - red with *white* background
Stippled boxes: In a blue box w/black border, three boxes:
Black and white/blue stippled arrow
(white vs. blue: depends on platform, but
consistent across canvas & pixmap)
[Click "cyan" => replace "white" with "cyan"]
Black and white stippled arrow
[Click "cyan" => replace "white" with "cyan"]
BB stippled
Green cross-hatch on {white,cyan}
Top subrow:
Down-left arrow (with a thin horizontal line), black on
background
Down-left arrow, red on background
Down-left arrow, red on background
Bottom subrow, on blue field in black-bordered roundrect:
Down-left arrow (with a thin horizontal line), black on
blue
Down-left arrow, red on blue
Down-left arrow, red on background (cyan or white)
BB logo, same as before
Down-left arrow - red on black
Stippled boxes, in a blue box w/black border, four black-outlined
shapes:
Sqaure - green down-arrows on blue field
Cirle - green down-arrows on background (cyan or white) field
Square - bb logo
Square - green cross-hatch on blue
Dashed lines: each half green, half black, first
with a {white,cyan} background, then a red background:
Dashed lines: each half green and half black with the background
color (white or cyan) between the dots/dashes, two of each:
Solid line
Dot line
Long Dash line
@ -79,43 +116,88 @@ The drawing area should have the following features:
The image should look the same regardless of the top radio button
setting --- Canvas, Pixmap, or Bitmap --- except that the Bitmap
setting might produce a black-and-white image. When you go from
Pixmap-&-*2 ("*2" is described next) back to Pixmap, there may be junk
from the *2 drawing left around the right and bottom. That's ok. Same
for going from Canvas-&-Cyan ("Cyan" is described later) to
Pixmap-&-Cyan.
setting must produce a black-and-white image. When you go from Pixmap
+ *2 ("*2" is described next) back to Pixmap, there may be junk from
the *2 drawing left around the right and bottom. That's ok. Same for
going from Canvas + Cyan ("Cyan" is described later) to Pixmap + Cyan.
Clicking on the "*2" checkbox should double the size of everything,
including the pen widths, but not the bitmaps. The 0x0 pen should
be the same width as before.
including the pen widths, but not the bitmaps. The 0x0 pen should be
the same width as before (1 pixel).
Clicking on "+10" should shift everything 10 pixels down and across.
(Even when "*2" is checked, it should be a 10 pixel offset).
Clicking on "Clip" should clip drawing to a 10-pixel strip 100 pixels
from the left. When "*2" is also clickied, the strip should grow
appropriately. "+10" should move the clipping region. (In either the
"*2" or "+10" case, the content of the strip should be the same.)
Clicking on "Cyan" should change the background to cyan instead of
white. When Pixmap or Bitmap is used, the background will be set in
the Pixmap/Bitmap, not the canvas, so a white background should frame
the cyan area to the right and bottom (if you make the window big
enough).
Clicking on "PostScript" should produce the same image in a PostScript
file.
Clipping should slip the drawing to a particular shape:
The "icons" and "stipple" boxes just enable those parts of the
drawing. PostScript drawing of icons and stipples can be slow.
rectangle - a 10-pixel strip 100 pixels from the left
octagon - the content of the big outlined octagon; some
part of the octagone outline is clipped
circle - a circle inscribed in the octagon's bounding
box
round rectangle - a rounded rect inscrobed in the the blue box for
testing stipples
unions, intersects, subtracts - hopefully obvious
polka - purple field with holes showing the normal drawing
When "*2" is also clicked, the clipping region should scale
accordingly. "+10" should move the clipping region. (In either the
"*2" or "+10" case, the content of the clipped region should be the
same.)
The "Clock" button tests a range of wedges. Each wedge has a 1-pixel
black background and orange filling. A sequence of wedges is
produced. Imagine the following:
The two hands of a clock start at 0 radians (i.e., 3:15). For each
step, the minute hand is moved back (counter-clockwise) pi/4
radians, while the hour hand moves back pi/8 radians, and
everything between the minute hand moving counter-clockwise to the
hour hand is filled in. So after drawing the full circle on the 0th
step, the wedge includes everything except a small slice on the 1st
step. The empty slice grows ever larger while shifting
counter-clockwise. By the time the minute hand wraps to 0 radians
(at which point the hour hand is a pi radians), the wedge covers
only the top half of the clock. It keeps going until the wedge
nearly disappears (but instead of disappearing, the whole circle is
filled in again). The same pattern is then repeated, but reversing
the wedge part and empty part (so the wedge starts small and grows
larger this time around).
The orange wedge is drawn just before the bitmaps, so they appear on
top of the orange wedge, but the wegde paints over other things. If
the "Pixmap" box is checked and the "Polka" clipping region is
selected, the result is an animtation where you can only see the
wedge grow and move through the polka-dot holes in the purple field.
The "Clip Clock" button is similar to "Clock", except that all drawing
is clipped to the area to be painted orange. "Clip Clock" clipping
overrides any other clipping setting.
Clicking on "PostScript" should produce the image described above in a
PostScript file.
The "icons" and "stipple" boxes enable those parts of the
drawing. These checkboxes are provided because PostScript drawing of
icons and stipples can be slow.
----------
Finally, print these instructions by hitting the "Print" button at the
top of the window. The following lines are for the printing test; they
should wrap aroundneatly on the printed page. (Don't add any
newlines.) Check to make sure no lines are skipped or duplicated across
page breaks. Try different page orientations.
top of the "What Should I See?" window. The following lines are for
the printing test; they should wrap aroundneatly on the printed
page. (Don't add any newlines.) Check to make sure no lines are
skipped or duplicated across page breaks. Try different page
orientations.
0 1 2 3 4 5 6 7 8 9 X O T T F
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

View File

@ -87,6 +87,9 @@
[pen0t (make-object pen% "BLACK" 0 'transparent)]
[pen1t (make-object pen% "BLACK" 1 'transparent)]
[pen2t (make-object pen% "BLACK" 2 'transparent)]
[pen0x (make-object pen% "BLACK" 0 'xor)]
[pen1x (make-object pen% "BLACK" 1 'xor)]
[pen2x (make-object pen% "BLACK" 2 'xor)]
[brushs (make-object brush% "BLACK" 'solid)]
[brusht (make-object brush% "BLACK" 'transparent)]
[brushb (make-object brush% "BLUE" 'solid)]
@ -97,7 +100,7 @@
(make-object bitmap% (* scale 350) (* scale 300) depth-one?)
#f)]
[draw-series
(lambda (dc pens pent size x y flevel last?)
(lambda (dc pens pent penx size x y flevel last?)
(let* ([ofont (send dc get-font)]
[otfg (send dc get-text-foreground)]
[otbg (send dc get-text-background)]
@ -196,7 +199,14 @@
(send dc draw-ellipse
(+ x 29) (+ y 80) 10 10)
(send dc set-pen penx)
(send dc draw-rectangle
(+ x 41) (+ y 50) 10 10)
(send dc draw-rounded-rectangle
(+ x 41) (+ y 65) 10 10 3)
(send dc draw-ellipse
(+ x 41) (+ y 80) 10 10)
(send dc set-pen pens)
(send dc draw-rectangle
(+ x 17) (+ y 95) 10 10)
@ -251,6 +261,7 @@
(+ x 12) (+ y 15))
(send dc draw-point (+ x 35) (+ y 115))
(send dc draw-line (+ x 35) (+ y 120) (+ x 35) (+ y 120))
(send dc draw-line
(+ x 5) (+ y 125) (+ x 10) (+ y 125))
@ -515,11 +526,11 @@
(send dc draw-rectangle 0 0 5 5)
(send dc draw-line 0 0 20 6)
(draw-series dc pen0s pen0t "0 x 0" 5 0 0 #f)
(draw-series dc pen0s pen0t pen0x "0 x 0" 5 0 0 #f)
(draw-series dc pen1s pen1t "1 x 1" 70 0 1 #f)
(draw-series dc pen1s pen1t pen1x "1 x 1" 70 0 1 #f)
(draw-series dc pen2s pen2t "2 x 2" 135 0 2 #t)
(draw-series dc pen2s pen2t pen2x "2 x 2" 135 0 2 #t)
(unless clock-clip?
(let ([r (send dc get-clipping-region)])