]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Mod/Pattern/Lines.pm
Complete patterns implementation, interface and tests
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Mod / Pattern / Lines.pm
index 494817a0b41edc97dccb4c0bc6bd634e616878a8..d38222c576f2b6e9980ff44deb26eb10ce47467c 100644 (file)
@@ -89,18 +89,18 @@ my $forge_template = Sub::Name::subname('forge_template' => sub {
   return;
  }
 
- <<" PATTERN";
-\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{%
- \\pgfsetlinewidth{$line_width}
- \\pgfpathmoveto{$line_begin}
- \\pgfpathlineto{$line_end}
- \\pgfusepath{stroke}
-}
- PATTERN
+ return [
+  "\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{",
+  "\\pgfsetlinewidth{$line_width}",
+  "\\pgfpathmoveto{$line_begin}",
+  "\\pgfpathlineto{$line_end}",
+  "\\pgfusepath{stroke}",
+  "}",
+ ];
 });
 
 around 'BUILDARGS' => sub {
- my ($orig, $class, %args);
+ my ($orig, $class, %args) = @_;
 
  confess('Can\'t specify an explicit template for a '. __PACKAGE__ .' pattern')
                                                       if exists $args{template};