]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Set/Union.pm
Introduce the ->begin and ->end path methods
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Set / Union.pm
index 228a6ff455a1bc5a404896abecb359bef9886056..13b5dc64c0623fb0d590eacce9de636f231ec816 100644 (file)
@@ -78,6 +78,32 @@ sub path {
  join ' ', map $_->path(@_), $set->kids;
 }
 
+=head2 C<begin>
+
+=cut
+
+sub begin {
+ my $set = shift;
+
+ my @kids = $set->kids;
+ return undef unless @kids;
+
+ $kids[0]->begin;
+}
+
+=head2 C<end>
+
+=cut
+
+sub end {
+ my $set = shift;
+
+ my @kids = $set->kids;
+ return undef unless @kids;
+
+ $kids[-1]->end;
+}
+
 LaTeX::TikZ::Interface->register(
  union => sub {
   shift;