I've been looking for a couple of days now and I can't find a library
for svg graphics with a canvas object so I can make a financial
charting application(stand alone, not web based), is there such a
thing? maybe I'm missing something obvious.
Best regards,
Steven
Steven Quinones-Colon wrote:
I've been looking for a couple of days now and I can't find a library
for svg graphics with a canvas object so I can make a financial
charting application(stand alone, not web based), is there such a
thing? maybe I'm missing something obvious.
Most of the available GUI libraries support graphics. I have been using the
Qt library for this sort of thing, and the graphics are quite acceptable:
http://localhost/ruby/graphinity/index.html
http://localhost/ruby/gravity/index.html
I have only used the Qt library, there are several others, most of them
offer this sort of graphic library. It's not necessary to create a GUI in
order to use the graphic libraries they offer.
If you were planning to create a GUI to go along with your graphic images,
then this approach makes even more sense.
···
--
Paul Lutus
http://www.arachnoid.com
http://www.simplesystems.org/RMagick/doc/rvgtut.html
···
On Dec 13, 2006, at 6:33 PM, Steven Quinones-Colon wrote:
maybe I'm missing something obvious.
--
Julian 'Julik' Tarkhanov
please send all personal mail to
me at julik.nl
I haven't tried it at all, but there are Ruby bindings for the Cairo library (http://cairographics.org/rcairo\) which should produce really nice output.
Cheers,
Pete Yandell
···
On 14/12/2006, at 4:33 AM, Steven Quinones-Colon wrote:
I've been looking for a couple of days now and I can't find a library
for svg graphics with a canvas object so I can make a financial
charting application(stand alone, not web based), is there such a
thing? maybe I'm missing something obvious.
Best regards,
Steven
Hi,
In <73800bf00612130933y3687294fp709276366a686fa7@mail.gmail.com>
"SVG Canvas" on Thu, 14 Dec 2006 02:33:44 +0900,
···
"Steven Quinones-Colon" <stevenq1967@gmail.com> wrote:
I've been looking for a couple of days now and I can't find a library
for svg graphics with a canvas object so I can make a financial
charting application(stand alone, not web based), is there such a
thing? maybe I'm missing something obvious.
If you want to only show SVG, the following example will
help you:
CVS Info for project ruby-gnome2
If you want to output your chart to screen and SVG file, the
following small script will help you:
====
#!/usr/bin/env ruby
require 'gtk2'
require 'rsvg2'
def draw(context, width, height)
context.move_to(0, 0)
context.line_to(width, height)
context.stroke
context.move_to(width, 0)
context.line_to(0, height)
context.stroke
end
window = Gtk::Window.new
window.set_default_size(300, 300)
vbox = Gtk::VBox.new
area = Gtk::DrawingArea.new
save = Gtk::Button.new("save")
window.signal_connect("destroy") do
Gtk.main_quit
end
area.signal_connect("expose_event") do |widget, event|
width, height = area.window.size
context = widget.window.create_cairo_context
draw(context, width, height)
true
end
save.signal_connect("clicked") do |widget, event|
width, height = area.window.size
surface = Cairo::SVGSurface.new("output.svg", width, height)
context = Cairo::Context.new(surface)
draw(context, width, height)
context.show_page
surface.finish
true
end
vbox.pack_start(area, true, true)
vbox.pack_end(save, false, false)
window.add(vbox)
window.show_all
Gtk.main
Thanks,
--
kou
[snip]
http://www.arachnoid.com/ruby/graphinity/index.html
http://vww.arachnoid.com/ruby/gravity/index.html
···
On 12/13/06, Paul Lutus <nospam@nosite.zzz> wrote:
Steven Quinones-Colon wrote:
> I've been looking for a couple of days now and I can't find a library
> for svg graphics with a canvas object so I can make a financial
> charting application(stand alone, not web based), is there such a
> thing? maybe I'm missing something obvious.Most of the available GUI libraries support graphics. I have been using the
Qt library for this sort of thing, and the graphics are quite acceptable:
--
Simon Strandgaard
Thanks, I'll try these.
Steven
···
If you want to output your chart to screen and SVG file, the
following small script will help you:====
Simon Strandgaard wrote:
···
On 12/13/06, Paul Lutus <nospam@nosite.zzz> wrote:
Steven Quinones-Colon wrote:
> I've been looking for a couple of days now and I can't find a library
> for svg graphics with a canvas object so I can make a financial
> charting application(stand alone, not web based), is there such a
> thing? maybe I'm missing something obvious.Most of the available GUI libraries support graphics. I have been using
the Qt library for this sort of thing, and the graphics are quite
acceptable:[snip]
http://www.arachnoid.com/ruby/graphinity/index.html
http://vww.arachnoid.com/ruby/gravity/index.html
Thank you -- I managed to overlook the URL content as I collected the data
locally.
--
Paul Lutus
http://www.arachnoid.com