]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/commitdiff
Bump the default space width of patterns to 10
authorVincent Pit <vince@profvince.com>
Sun, 1 Aug 2010 21:56:50 +0000 (23:56 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 1 Aug 2010 21:56:50 +0000 (23:56 +0200)
lib/LaTeX/TikZ.pm
lib/LaTeX/TikZ/Mod/Pattern/Dots.pm
lib/LaTeX/TikZ/Mod/Pattern/Lines.pm
samples/synopsis.pl
t/23-pattern.t

index 02d9b676c1d39341cd364bd90c175ff98b0206a5..c425f296e94f1e7f017684f38fade652b077b773 100644 (file)
@@ -36,7 +36,7 @@ our $VERSION = '0.01';
     $octo->clip(Tikz->rectangle(-0.5*(1+i), 2*(1+i)));
 
     # Fill it with dots
-    $octo->mod(Tikz->pattern(class => 'Dots', space_width => 10));
+    $octo->mod(Tikz->pattern(class => 'Dots'));
 
     # Create a formatter object
     my $tikz = Tikz->formatter(scale => 5);
index 1e3bfaa34902e3205673d866ca56caa05c8067a1..3698a2f58c0fbbe7b418577da4a85b39a952fbd4 100644 (file)
@@ -47,7 +47,7 @@ has 'dot_width' => (
 has 'space_width' => (
  is      => 'ro',
  isa     => subtype('Num' => where { LaTeX::TikZ::Tools::numcmp($_, 0) >= 0 }),
- default => 1,
+ default => 10,
 );
 
 my $W = Sub::Name::subname('WIDTH' => sub { sprintf '#WIDTH=%0.1f#', @_ });
index d495ffd2067e7c72eff771c24d5d8ce150bc8b12..10a63f49d470aec29bf0a37786e14a0048bf4873 100644 (file)
@@ -63,7 +63,7 @@ has 'line_width' => (
 has 'space_width' => (
  is      => 'ro',
  isa     => subtype('Num' => where { LaTeX::TikZ::Tools::numcmp($_, 0) >= 0 }),
- default => 1,
+ default => 10,
 );
 
 my $W = Sub::Name::subname('WIDTH' => sub { sprintf '#WIDTH=%0.1f#', @_ });
index c5ab5fd2d7b686c07dea11bd5181c55abc51a846..41c22956b770488b2b357319e8d021936493c97f 100644 (file)
@@ -24,7 +24,7 @@ my $octo = Tikz->closed_polyline(
 $octo->clip(Tikz->rectangle(-0.5*(1+i), 2*(1+i)));
 
 # Fill it with dots
-$octo->mod(Tikz->pattern(class => 'Dots', space_width => 10));
+$octo->mod(Tikz->pattern(class => 'Dots'));
 
 # Create a formatter object
 my $tikz = Tikz->formatter(scale => 5);
index 5f69bd0f22290156244f9ba0809d4f4cf6ceabe9..c592ad07b0e5286998ad114c32ce04627eae71a3 100644 (file)
@@ -44,10 +44,10 @@ my $lines = eval {
 is $@, '', 'creating a line pattern doesn\'t croak';
 
 check $lines, 'a line pattern', <<'DECL', <<'BODY';
-\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
+\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
 \pgfsetlinewidth{0.2pt}
-\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.1pt}}
-\pgfpathlineto{\pgfqpoint{0.3pt}{0.1pt}}
+\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.8pt}}
+\pgfpathlineto{\pgfqpoint{1.8pt}{0.8pt}}
 \pgfusepath{stroke}
 }
 DECL
@@ -61,8 +61,8 @@ my $dots = eval {
 is $@, '', 'creating a dot pattern doesn\'t croak';
 
 check $dots, 'a dot pattern', <<'DECL', <<'BODY';
-\pgfdeclarepatternformonly{patb}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
-\pgfpathcircle{\pgfqpoint{0.1pt}{0.1pt}}{0.2pt}
+\pgfdeclarepatternformonly{patb}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
+\pgfpathcircle{\pgfqpoint{0.8pt}{0.8pt}}{0.2pt}
 \pgfusepath{fill}
 }
 DECL
@@ -81,10 +81,10 @@ my $seq = eval {
 is $@, '', 'creating a sequence with two identic patterns doesn\'t croak';
 
 check $seq, 'a sequence with two identic patterns', <<'DECL', <<'BODY';
-\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
+\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
 \pgfsetlinewidth{0.2pt}
-\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.1pt}}
-\pgfpathlineto{\pgfqpoint{0.3pt}{0.1pt}}
+\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.8pt}}
+\pgfpathlineto{\pgfqpoint{1.8pt}{0.8pt}}
 \pgfusepath{stroke}
 }
 DECL
@@ -101,16 +101,16 @@ is $@, '',
          'creating a sequence with two orthogonal line patterns doesn\'t croak';
 
 check $seq, 'a sequence with two orthogonal line patterns', <<'DECL', <<'BODY';
-\pgfdeclarepatternformonly{patc}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
+\pgfdeclarepatternformonly{patc}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
 \pgfsetlinewidth{0.2pt}
-\pgfpathmoveto{\pgfqpoint{0.1pt}{-0.2pt}}
-\pgfpathlineto{\pgfqpoint{0.1pt}{0.3pt}}
+\pgfpathmoveto{\pgfqpoint{0.8pt}{-0.2pt}}
+\pgfpathlineto{\pgfqpoint{0.8pt}{1.8pt}}
 \pgfusepath{stroke}
 }
-\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
+\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
 \pgfsetlinewidth{0.2pt}
-\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.1pt}}
-\pgfpathlineto{\pgfqpoint{0.3pt}{0.1pt}}
+\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.8pt}}
+\pgfpathlineto{\pgfqpoint{1.8pt}{0.8pt}}
 \pgfusepath{stroke}
 }
 DECL
@@ -126,14 +126,14 @@ $seq = eval {
 is $@, '', 'creating a sequence with two different patterns doesn\'t croak';
 
 check $seq, 'a sequence with two different patterns', <<'DECL', <<'BODY';
-\pgfdeclarepatternformonly{patb}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
-\pgfpathcircle{\pgfqpoint{0.1pt}{0.1pt}}{0.2pt}
+\pgfdeclarepatternformonly{patb}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
+\pgfpathcircle{\pgfqpoint{0.8pt}{0.8pt}}{0.2pt}
 \pgfusepath{fill}
 }
-\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{0.3pt}{0.3pt}}{\pgfqpoint{0.2pt}{0.2pt}}{
+\pgfdeclarepatternformonly{pata}{\pgfqpoint{-0.2pt}{-0.2pt}}{\pgfqpoint{1.8pt}{1.8pt}}{\pgfqpoint{1.6pt}{1.6pt}}{
 \pgfsetlinewidth{0.2pt}
-\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.1pt}}
-\pgfpathlineto{\pgfqpoint{0.3pt}{0.1pt}}
+\pgfpathmoveto{\pgfqpoint{-0.2pt}{0.8pt}}
+\pgfpathlineto{\pgfqpoint{1.8pt}{0.8pt}}
 \pgfusepath{stroke}
 }
 DECL