Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Image::SVG::Path 0.07

    Download button

    No screenshots available
    Downloads: 89  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ben Bullock | More programs
    Perl Artistic License / FREE
    April 24th, 2012, 11:15 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Image::SVG::Path description

    Read the "d" attribute of an SVG path

    Image::SVG::Path is Perl module that extracts information contained in the "d" attribute of an SVG < path > element and turns it into a simpler series of steps.

    For example, an SVG < path > element might take the form

    < path d="M9.6,20.25c0.61,0.37,3.91,0.45,4.52,0.34c2.86-0.5,14.5-2.09,21.37-2.64c0.94-0.07,2.67-0.26,3.45,0.04"/ >

    Using an XML parser, such as XML::Parser,

     use XML::Parser;
     use Image::SVG::Path 'extract_path_info';
     my $p = XML::Parser->new (Handlers => {Start => \& start});
     $p->parsefile ($file)
     or die "Error $file: ";

     sub start
     {
     my ($expat, $element, %attr) = @_;

     if ($element eq 'path') {
     my $d = $attr{d};
     my @r = extract_path_info ($d);
     # Do something with path info in @r
     }
     }


    SVG means "scalable vector graphics" and it is a standard of the W3 consortium. See http://www.w3.org/TR/SVG/ for the full specification. See http://www.w3.org/TR/SVG/paths.html for the specification for paths. Although SVG is a type of XML, the text in the d attribute of SVG paths is not in the XML format but in a more condensed form using single letters and numbers. This module is a parser for that condensed format.

    SYNOPSIS

     use Image::SVG::Path 'extract_path_info';
     my @path_info = extract_path_info ($path_d_attribute);



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    SVG path | Perl module | Perl | SVG | path

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM