[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Ruby Vector Graphics 0.3.0

Tim Hunter

1/15/2005 5:52:00 PM

RVG is a library for drawing 2D graphics with an API based on the SVG
specification. RVG is a pure-Ruby add-on to RMagick, the binding for
ImageMagick and GraphicsMagick. Version 0.3.0 is available, as usual, at
RubyForge: http://rubyforge.org/pro...

Version 0.3.0 adds support for patterns. A pattern is a collection of
shapes, text, or raster images that can be used as a stroke or fill.

RVG supports the following SVG concepts:

o Structure: RVG, groups, defs, and use
o User-coordinate systems
o Coordinate system transformations (translate, rotate, etc.)
o Raster images
o Basic shapes: line, rectangle, circle, ellipse, polygon, polyline
o Styles: fill, stroke, opacity, font_size, etc.
o Paths
o Text
o Patterns
o Clipping paths
o Units conversions (cm, in, etc.)

RVG would be a good library to use if you're writing an application that
needs to programmatically generate drawings, such as a charting
application. You can see an example RVG program at
http://rvg.rub.... The tarball includes copious RDoc documentation
and examples.

RVG supports all the parts of SVG that ImageMagick/GraphicsMagick supports.
I've spent the last week or so converting and running 40+ tests from the
W3C SVG 1.1 Test Suite (http://www.w3.org/Graphics...) to Ruby+RVG.
At this point I'm satisfied that RVG reasonably bug-free and complete.
Therefore this will be the last "alpha" release.

I'm going to hold back on integrating RVG into the RMagick library just yet.
I want to rewrite the RDoc to match RMagick's documentation, and that'll be
a big job. So there's still plenty of time for changes based on your
feedback before RVG "goes production" so please don't hesitate to give it a
try and let me know what you think!

Tim
2 Answers

Luke Galea

1/15/2005 5:58:00 PM

0

Hi Tim,

Do you know of any libraries for ruby to render SVG to a raster file (for
those who are SVG impaired ?? )

Thanks in advance

On Saturday 15 January 2005 12:56, Tim Hunter wrote:
> RVG is a library for drawing 2D graphics with an API based on the SVG
> specification. RVG is a pure-Ruby add-on to RMagick, the binding for
> ImageMagick and GraphicsMagick. Version 0.3.0 is available, as usual, at
> RubyForge: http://rubyforge.org/pro...
>
> Version 0.3.0 adds support for patterns. A pattern is a collection of
> shapes, text, or raster images that can be used as a stroke or fill.
>
> RVG supports the following SVG concepts:
>
> o Structure: RVG, groups, defs, and use
> o User-coordinate systems
> o Coordinate system transformations (translate, rotate, etc.)
> o Raster images
> o Basic shapes: line, rectangle, circle, ellipse, polygon, polyline
> o Styles: fill, stroke, opacity, font_size, etc.
> o Paths
> o Text
> o Patterns
> o Clipping paths
> o Units conversions (cm, in, etc.)
>
> RVG would be a good library to use if you're writing an application that
> needs to programmatically generate drawings, such as a charting
> application. You can see an example RVG program at
> http://rvg.rub.... The tarball includes copious RDoc documentation
> and examples.
>
> RVG supports all the parts of SVG that ImageMagick/GraphicsMagick supports.
> I've spent the last week or so converting and running 40+ tests from the
> W3C SVG 1.1 Test Suite (http://www.w3.org/Graphics...) to Ruby+RVG.
> At this point I'm satisfied that RVG reasonably bug-free and complete.
> Therefore this will be the last "alpha" release.
>
> I'm going to hold back on integrating RVG into the RMagick library just
> yet. I want to rewrite the RDoc to match RMagick's documentation, and
> that'll be a big job. So there's still plenty of time for changes based on
> your feedback before RVG "goes production" so please don't hesitate to give
> it a try and let me know what you think!
>
> Tim


Tim Hunter

1/15/2005 8:59:00 PM

0

Luke Galea wrote:

> Hi Tim,
>
> Do you know of any libraries for ruby to render SVG to a raster file (for
> those who are SVG impaired ?? )
>

You can use RMagick (http://rmagick.rub...) to convert _some_ SVG
files to any raster format that ImageMagick supports. I say _some_ because
ImageMagick (upon which RMagick is based) supports only a subset of SVG.
For example, it doesn't support filters and gradients. If you have
questions about specific SVG elements let me know and I'll try to answer
them.

I'm told that ImageMagick's support for SVG is scheduled for major upgrades
very soon, though. RMagick and RVG will of course be updated to support all
the improvements as soon as they appear.