Ruby and SVG

R

RolfK

Dear ALL,

I'm an absolutely beginner to Ruby.
But, besides the language itself (which seems quite interesting to
me ) it is importnat to find out what support is available for XML
and in particular for SVG. I served a bit around "Ruby SVG" and my
impression is that there is maybe no active development.

I have to create a lot of technical drawings and charts.
Another point is the renderer and may be in addition an interactive
canvas.

Can anybody feedback some comment on this.


Thanks a lot

Rolf
 
S

Serabe

2008/11/23 RolfK said:
Dear ALL,

I'm an absolutely beginner to Ruby.
But, besides the language itself (which seems quite interesting to
me ) it is importnat to find out what support is available for XML
and in particular for SVG. I served a bit around "Ruby SVG" and my
impression is that there is maybe no active development.

I have to create a lot of technical drawings and charts.
Another point is the renderer and may be in addition an interactive
canvas.

Take a look at RMagick and RVG.

Regards,

Serabe
 
K

Kouhei Sutou

Hi,

In <[email protected]>
"Ruby and SVG" on Sun, 23 Nov 2008 19:25:46 +0900,
RolfK said:
I'm an absolutely beginner to Ruby.
But, besides the language itself (which seems quite interesting to
me ) it is importnat to find out what support is available for XML
and in particular for SVG. I served a bit around "Ruby SVG" and my
impression is that there is maybe no active development.

I have to create a lot of technical drawings and charts.
Another point is the renderer and may be in addition an interactive
canvas.

Can anybody feedback some comment on this.

You can use rcairo that is the Ruby bindings for cairo to
output SVG.

rcairo: http://cairo.rubyforge.org/
cairo: http://cairographics.org/

You can use Ruby/RSVG that is the Ruby bindings for librsvg
to render SVG:

Ruby/RSVG: http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby/RSVG
librsvg: http://librsvg.sourceforge.net/
(News in the page is outdated.)

Wikipedia also uses librsvg:
http://en.wikipedia.org/wiki/Librsvg


Thanks,
 
P

Phlip

RolfK said:
I'm an absolutely beginner to Ruby.
But, besides the language itself (which seems quite interesting to
me ) it is importnat to find out what support is available for XML
and in particular for SVG. I served a bit around "Ruby SVG" and my
impression is that there is maybe no active development.

I have to create a lot of technical drawings and charts.
Another point is the renderer and may be in addition an interactive
canvas.

Can anybody feedback some comment on this.

libxml-ruby is going to handle SVG fine - but low level, without awareness of
all the nodes' meanings.

You need to think first of a high-level editor that is already written.
Inkscape, for example, is open-source, and has Ruby bindings. So, IIRC, does
Google Sketchup.

Then write unit tests for everything you do. I would use XPath in those tests to
spot-check the SVG contents...
 
R

RolfK

Philip,

thank you for your suggestion.
Up to today I have created my SVGs out of a data xml by xslt/xpath
2.0. But this was not interactive, as displaying the result took a
renderer.
If I understand your idea right, I could use Inkscape to create all
the shape objects out of my Ruby program.
Does the binding also handle mouse events (e.g. created by mouseup/
down) on an Inksacpe SVG object ?
 
C

Charles Oliver Nutter

RolfK said:
Dear ALL,

I'm an absolutely beginner to Ruby.
But, besides the language itself (which seems quite interesting to
me ) it is importnat to find out what support is available for XML
and in particular for SVG. I served a bit around "Ruby SVG" and my
impression is that there is maybe no active development.

I have to create a lot of technical drawings and charts.
Another point is the renderer and may be in addition an interactive
canvas.

JRuby + Batik!

http://xmlgraphics.apache.org/batik/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top