aboutsummaryrefslogtreecommitdiff
path: root/Perl/t
diff options
context:
space:
mode:
authormertz2003-09-11 10:03:05 +0000
committermertz2003-09-11 10:03:05 +0000
commit2d63150c35f01336655336a3bea5da91aa41cf3b (patch)
tree93c2b53004f9ce6cf1b260d4ef1dc0133099c36d /Perl/t
parentb910e349c10b14c6b7d1e35141c1b5375b16a674 (diff)
downloadtkzinc-2d63150c35f01336655336a3bea5da91aa41cf3b.zip
tkzinc-2d63150c35f01336655336a3bea5da91aa41cf3b.tar.gz
tkzinc-2d63150c35f01336655336a3bea5da91aa41cf3b.tar.bz2
tkzinc-2d63150c35f01336655336a3bea5da91aa41cf3b.tar.xz
2 new tests...
Diffstat (limited to 'Perl/t')
-rw-r--r--Perl/t/test-methods.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/Perl/t/test-methods.pl b/Perl/t/test-methods.pl
index 88a0d10..9becf7e 100644
--- a/Perl/t/test-methods.pl
+++ b/Perl/t/test-methods.pl
@@ -210,8 +210,11 @@ sub test_bboxes {
[100,200,300,400], "a simple rectangle with linewidth of 5");
# Rectangular curves
+ &bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ],
+ -linewidth =>0),
+ [100,200,300,400], "a rectangular curve of linewidth => 0");
&bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ]),
- [100,200,300,400], "a rectangular curve");
+ [100,200,300,400], "a rectangular curve of linewidth => 1");
&bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ],
-linewidth => 2),
[100,200,300,400], "a rectangular curve of linewidth => 2");
@@ -222,6 +225,10 @@ sub test_bboxes {
-linewidth => 5),
[100,200,300,400], "a rectangular curve");
+ # triangular curves (with a sharp angle)
+ &bbox_must_be($zinc->add('curve', 1, [ [0,0], [100,0], [0,10] ]),
+ [0,0,100,10], "a triangular curve of linewidth => 1)");
+
# Arcs
&bbox_must_be($zinc->add('arc', 1, [100,200,300,400]),
[100,200,300,400], "an arc");
@@ -229,6 +236,7 @@ sub test_bboxes {
[100,200,300,400], "an arc of linewidth => 2");
&bbox_must_be($zinc->add('arc', 1, [100,200,300,400], -linewidth => 3),
[100,200,300,400], "an arc of linewidth => 3");
+
&log (0, "#---- End of test_bboxes -----\n");
} # end of test_bboxes