diff options
author | hobbs <hobbs> | 2002-10-10 07:25:23 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-10-10 07:25:23 (GMT) |
commit | 27bc84f29819296e66b803683cbf20d63be6740d (patch) | |
tree | 250461cd6dd036597827c9fd5f9314674f2a8818 /tests/canvPs.test | |
parent | 25123e31f97accbe94c10807eb300f4311ff7916 (diff) | |
download | tk-27bc84f29819296e66b803683cbf20d63be6740d.zip tk-27bc84f29819296e66b803683cbf20d63be6740d.tar.gz tk-27bc84f29819296e66b803683cbf20d63be6740d.tar.bz2 |
* tests/canvPs.test: tests for canvas embedded window ps generation
* generic/tkCanvWind.c (CanvasPsWindow): removed dead code loop.
* generic/tkCanvas.h: moved TkColormapData struct to tkCanvPs.c
* generic/tkCanvPs.c (TkImageGetColor): corrected bogus use of
TkColormapData on Windows. Non-separated data may need correction
as well.
* win/tkWinImage.c (XGetImage, XGetImageZPixmap): added support
for generating ps for embedded windows on canvases.
Diffstat (limited to 'tests/canvPs.test')
-rw-r--r-- | tests/canvPs.test | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/canvPs.test b/tests/canvPs.test index 8faad75..8ab93a0 100644 --- a/tests/canvPs.test +++ b/tests/canvPs.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: canvPs.test,v 1.4 2002/07/14 05:48:46 dgp Exp $ +# RCS: @(#) $Id: canvPs.test,v 1.5 2002/10/10 07:25:24 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -94,6 +94,36 @@ test canvPs-2.4 {test writing to channel and file, same output} {pcOnly} { set status } ok +test canvPs-3.1 {test ps generation with an embedded window} {} { + removeFile bar.ps + destroy .c + pack [canvas .c -width 200 -height 200 -background white] + .c create rect 20 20 150 150 -tags rect0 -dash . -width 2 + .c create arc 0 50 200 200 -tags arc0 \ + -dash {4 4} -stipple question -outline red -fill green + + image create photo logo \ + -file [file join $tk_library images pwrdLogo150.gif] + .c create image 200 50 -image logo -anchor nw + + entry .c.e -background pink -foreground blue -width 14 + .c.e insert 0 "we gonna be postscripted" + .c create window 50 180 -anchor nw -window .c.e + update + .c postscript -file bar.ps + file exists bar.ps +} 1 +test canvPs-3.2 {test ps generation with an embedded window not mapped} {} { + removeFile bar.ps + destroy .c + pack [canvas .c -width 200 -height 200 -background white] + entry .c.e -background pink -foreground blue -width 14 + .c.e insert 0 "we gonna be postscripted" + .c create window 50 180 -anchor nw -window .c.e + .c postscript -file bar.ps + file exists bar.ps +} 1 + # cleanup removeFile foo.ps removeFile bar.ps |