]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Set/Polyline.pm
Introduce the ->begin and ->end path methods
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Set / Polyline.pm
index a1992a5d11790e0bd677745bb28e6ee38bfeeaa8..987c321d380f3cb7efce1437b8d68f29a09cc2ef 100644 (file)
@@ -83,6 +83,32 @@ sub path {
               ($set->closed ? 'cycle' : ());
 }
 
+=head2 C<begin>
+
+=cut
+
+sub begin {
+ my $set = shift;
+
+ my @points = $set->points;
+ return undef unless @points;
+
+ $points[0]->begin;
+}
+
+=head2 C<end>
+
+=cut
+
+sub end {
+ my $set = shift;
+
+ my @points = $set->points;
+ return undef unless @points;
+
+ $points[-1]->end;
+}
+
 LaTeX::TikZ::Interface->register(
  polyline => sub {
   shift;