aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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