]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Formatter.pm
Get rid of LaTeX::TikZ::Set::Mod
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Formatter.pm
index 64266072622b8dac002b407a7c57fa534e13e358..da0656c288fbe4bf358bc4e6066d6b4ca8cc98eb 100644 (file)
@@ -62,13 +62,11 @@ $find_mods = do {
  Sub::Name::subname('find_mods' => sub {
   my ($set, $layers, $others) = @_;
 
-  if ($set->isa('LaTeX::TikZ::Set::Mod')) {
-   for ($set->mods) {
-    if ($_->isa('LaTeX::TikZ::Mod::Layer')) {
-     push @$layers, $_;
-    } else {
-     push @$others, $_;
-    }
+  for ($set->mods) {
+   if ($_->isa('LaTeX::TikZ::Mod::Layer')) {
+    push @$layers, $_;
+   } else {
+    push @$others, $_;
    }
   }
 
@@ -111,16 +109,12 @@ sub render {
  );
 
  my @decls;
- if (@layers) {
-  push @decls, LaTeX::TikZ::Mod::Layer->declare(@layers);
- }
- for (@other_mods) {
-  push @decls, $_->declare($tikz);
- }
+ push @decls, LaTeX::TikZ::Mod::Layer->declare(@layers) if  @layers;
+ push @decls, $_->declare($tikz)                        for @other_mods;
 
  my @content = (
   "\\begin{tikzpicture}",
-  $seq->draw($tikz)->instantiate,
+  @{ $seq->draw($tikz) },
   "\\end{tikzpicture}",
  );