Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Curveto Command in SVG

by gwadej (Chaplain)
on Jul 07, 2009 at 19:56 UTC ( [id://777998]=note: print w/replies, xml ) Need Help??


in reply to Curveto Command in SVG

The issue is that the get_path method is designed specifically for creating appropriate paths in <path/>, <polyline/>, and <polygon/> tags. Piecewise-linear paths are the only things these three tags have in common.

If you want to use the other path commands, you need to create the path yourself. The syntax is not really very complicated.

G. Wade

Replies are listed 'Best First'.
Re^2: Curveto Command in SVG
by thekestrel (Friar) on Jul 07, 2009 at 20:54 UTC
    Ok,
    Found the module code and I believe I understand what it going on now.
    my $string = "M 6,0 C 2.676,0 0,2.676 0,6 L 0,$cont_tbh L $cont_w, +$cont_tbh L $cont_w,6 C $cont_w,2.676 $cont_w - 2.676,0 $cont_w - 6,0 + L 6,0 Z"; my $tag = $svg->path( d => $string, id => 'pline_1', style => { 'fill-color' => 'green' } );

    The following allows me to send a custom string to the SVG engine.
    Thanks, Paul.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://777998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found