my $scale = sprintf '%0.2f', $tikz->scale / 5;
- "node[scale=$scale,$pos] {\$$name\$}";
+ "node[scale=$scale,$pos] {$name}";
}
sub thickness {
use strict;
use warnings;
-use Test::More tests => 6 + 2 * 6;
+use Test::More tests => 8 + 2 * 8;
use Math::Complex;
check $p, 'a point from an array ref', <<'RES';
\draw (-3cm,2cm) ;
RES
+
+$p = eval {
+ Tikz->point(
+ [1,-1],
+ label => 'foo',
+ );
+};
+is $@, '', 'creating a labeled point from an array ref doesn\'t croak';
+
+check $p, 'a labeled point', <<'RES';
+\draw (1cm,-1cm) [fill] circle (0.4pt) node[scale=0.20,above] {foo} ;
+RES
+
+$p = eval {
+ Tikz->point(
+ [2,-2],
+ label => 'bar',
+ pos => 'below right',
+ );
+};
+is $@, '',
+ 'creating a labeled positioned point from an array ref doesn\'t croak';
+
+check $p, 'a labeled positioned point', <<'RES';
+\draw (2cm,-2cm) [fill] circle (0.4pt) node[scale=0.20,below right] {bar} ;
+RES