Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
If you're doing the highlighting client-side (via rollovers) I'd just use the SVG DOM for it. Unfortunately perl doesn't have a fully capable SVG parser yet (though AxPoint contains an SVG path parser which you may find useful - that's probably the hardest part), so in order to get at those bits you're better off doing it client side.

Unlike HTML, SVG has a very stable client-side Javascript spec, and works very well in the Adobe viewer (using the mozilla javascript engine).

If that doesn't cover what you're after, then yes, parse with a SAX parser and extract the paths. I don't know how they'll be done in your SVG (there are various different ways in SVG to define a path).

The other thing to do is to hand-refine your SVG, so that each region is a <g> group. Then you can do funky things with those groups like enlarge and bring them forward as you mouse over them. There's been some good examples of this on

In reply to Re: Interfacing Perl and SVG by Matts
in thread Interfacing Perl and SVG by Baz

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-17 21:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found