]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Mod/Pattern/Dots.pm
Complete patterns implementation, interface and tests
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Mod / Pattern / Dots.pm
index 3fea8a6b08bd863e5b9384f64b05e83eb788dd1c..b029915d02c60b3b506ebcd4c2780ee9a6b1892d 100644 (file)
@@ -53,16 +53,16 @@ my $forge_template = Sub::Name::subname('forge_template' => sub {
  $center     = "\\pgfqpoint{$half_width}{$half_width}";
  $tile_size  = "\\pgfqpoint{$width}{$width}";
 
- <<" PATTERN";
-\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{%
- \\pgfpathcircle{$center}{$dot_width}
- \\pgfusepath{fill}
-}
- PATTERN
+ return [
+  "\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{",
+  "\\pgfpathcircle{$center}{$dot_width}",
+  "\\pgfusepath{fill}",
+  '}',
+ ];
 });
 
 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};