Forum: Ruby Ruby and SVG

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3cd8cb24af45959ad992e7ff4541e725?d=identicon&s=25 RolfK (Guest)
on 2008-11-23 11:30
(Received via mailing list)
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
7b8e1744137ecbad51b24ab2d169779b?d=identicon&s=25 Serabe (Guest)
on 2008-11-23 11:54
(Received via mailing list)
2008/11/23 RolfK <Rolf.Kemper@...>:
> canvas.
Take a look at RMagick and RVG.

Regards,

Serabe
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2008-11-23 12:07
(Received via mailing list)
Hi,

In <dbc50453-da74-4c26-bec4-e0c78a3a7231@3g2000yqs.googlegroups.com>
  "Ruby and SVG" on Sun, 23 Nov 2008 19:25:46 +0900,
  RolfK <Rolf.Kemper@eu.necel.com> wrote:

> 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%2FRSVG
  librsvg: http://librsvg.sourceforge.net/
           (News in the page is outdated.)

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


Thanks,
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-11-23 15:40
(Received via mailing list)
RolfK wrote:

> 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...
3cd8cb24af45959ad992e7ff4541e725?d=identicon&s=25 RolfK (Guest)
on 2008-11-23 18:50
(Received via mailing list)
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 ?


Phlip schrieb:
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2008-11-23 20:37
(Received via mailing list)
RolfK wrote:
> canvas.
JRuby + Batik!

http://xmlgraphics.apache.org/batik/
73a9cbb9290b3454dadebf600b24071a?d=identicon&s=25 Ahmed Eldawy (ahmed-eldawy)
on 2011-04-11 15:27
There's a new gem called Rasem.
https://github.com/aseldawy/rasem
It's very easy to use and generates SVG directly. It's still in Alpha
release but it looks promising.
This topic is locked and can not be replied to.