Ruby app using svg under win32

hi,

I'm very new to ruby, so I'm writing this email to just ask the

doability of this project in ruby with ruby/gtk2 bindings.

I need to make this app that loads an svg (a planimetry of a building)
file and displays into a window. Then I have to trap mouse position and
popup a window with another svg (schematics of a tool) when the user
clicks on predefined zones of the building.

all this project has to work inside a cdrom, a friend of mine suggested
to me to prepare with one click ruby installer a setup.exe and install
it on the cdrom.

ok, that’s enough!

could you suggest to me if this thing is doable and if there are little
tutorials regarding svg handling or already ruby apps that are doing
similar tasks?

thanks! :slight_smile:

ciao,
Marco


,= ,--. =.
((
/)o o(_)) jabber:[email protected]/msn:[email protected]
-'(. .)-’ #removed_email_address@domain.invalid
_/ There’s no one inside that flat, everybody knows it


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

On Mi, 2006-05-31 at 21:23 +0200, Marco Milanesi wrote:

all this project has to work inside a cdrom, a friend of mine suggested
to me to prepare with one click ruby installer a setup.exe and install
it on the cdrom.

hi,

if you only want to do the described (a kind of “svg-kiosk-thing”), the
easiest way is completely without ruby. just use a svg-capable
webbrowser like mozilla and a little bit of javascript for the mouse
tracking.

if you need additional components i would suggest to use gtk-moz-embed
for the display of the svg. to implement a svg render engine on your own
is a very big task. just take a look at the svg-specs at
Scalable Vector Graphics (SVG) 1.1 (Second Edition) .

cheers
detlef


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

hi detlef,

if you only want to do the described (a kind of “svg-kiosk-thing”), the
easiest way is completely without ruby. just use a svg-capable
webbrowser like mozilla and a little bit of javascript for the mouse
tracking.

yeah, that could be a solution. I haven’t thought about that. The
problem is that it has to work also in IE :confused:

if you need additional components i would suggest to use gtk-moz-embed
for the display of the svg. to implement a svg render engine on your own
is a very big task. just take a look at the svg-specs at
Scalable Vector Graphics (SVG) 1.1 (Second Edition) .

yeah, I was hoping in something like this! so the ruby binding of
Gtk::MozEmbed could make the task? or is better to go c in your opinion?

thanks a lot for the tips, I appreciate :slight_smile:

ciao,
Marco


,= ,--. =.
((
/)o o(_)) jabber:[email protected]/msn:[email protected]
-'(. .)-’ #removed_email_address@domain.invalid
_/ There’s no one inside that flat, everybody knows it


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

On Mi, 2006-05-31 at 22:04 +0200, Marco Milanesi wrote:

hi detlef,

if you only want to do the described (a kind of “svg-kiosk-thing”), the
easiest way is completely without ruby. just use a svg-capable
webbrowser like mozilla and a little bit of javascript for the mouse
tracking.

yeah, that could be a solution. I haven’t thought about that. The
problem is that it has to work also in IE :confused:

you wrote, that you have to start it from cd. afaik you also can start
programs direkt from cd (sorry, don’t know windoze). so just put the
browser on the cd and start it via autostart.

if you need additional components i would suggest to use gtk-moz-embed
for the display of the svg. to implement a svg render engine on your own
is a very big task. just take a look at the svg-specs at
Scalable Vector Graphics (SVG) 1.1 (Second Edition) .

yeah, I was hoping in something like this! so the ruby binding of
Gtk::MozEmbed could make the task? or is better to go c in your opinion?

i never used gtk-moz-embed on my own, but mozilla can display svg and
the use of ruby-gnome is very easy. after all, it is much easier as to
write it all in c. from the performance point, its also no problem (as
long as you don’t want to generate the svg’s on the fly in ruby) cause
the main task of rendering the svg is done by mozilla and therefor
implemented in c(++?).

thanks a lot for the tips, I appreciate :slight_smile:

ciao,
Marco


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

yeah, that could be a solution. I haven’t thought about that. The
problem is that it has to work also in IE :confused:
you wrote, that you have to start it from cd. afaik you also can start
programs direkt from cd (sorry, don’t know windoze). so just put the
browser on the cd and start it via autostart.

me too (for the windows part). that’s an idea, maybe I will have much
more fun with ruby though. I’ll evaluate.

yeah, I was hoping in something like this! so the ruby binding of
Gtk::MozEmbed could make the task? or is better to go c in your opinion?
i never used gtk-moz-embed on my own, but mozilla can display svg and
the use of ruby-gnome is very easy. after all, it is much easier as to
write it all in c. from the performance point, its also no problem (as
long as you don’t want to generate the svg’s on the fly in ruby) cause
the main task of rendering the svg is done by mozilla and therefor
implemented in c(++?).

nono, only render the svg. ok, thanks a lot. now I have more useful
informations about this work.

ciao,
Marco

PS: thanks detlef. you have the same name of a character of the
movie/book Christiane F. - Wir Kinder vom Bahnhof Zoo, nice :slight_smile:


,= ,--. =.
((
/)o o(_)) jabber:[email protected]/msn:[email protected]
-'(. .)-’ #removed_email_address@domain.invalid
_/ There’s no one inside that flat, everybody knows it


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

for the record I succeded by looking at the examples to load an svg and
display it, here is the source:

require ‘rsvg2’
require ‘gtk2’

Gtk.init

gdk_pixbuf = RSVG.pixbuf_from_file(“./mysvg.svg”)

Gtk::Window.new.add(Gtk::Image.new(gdk_pixbuf)).show_all

Gtk.main

hope will be a start for a beautiful program :slight_smile:
nite all

ciao,
Marco


,= ,--. =.
((
/)o o(_)) jabber:[email protected]/msn:[email protected]
-'(. .)-’ #removed_email_address@domain.invalid
_/ There’s no one inside that flat, everybody knows it


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

And is it easy to put on a CD? (there is a not so easy explanation on
the site to make a ruby executable…)

I don’t know yet, when I succeed to run it under windows I’ll post (If I
remember!) how I have done. Basically I predict that I’ll have to cross
compile or compile under win (emulated yes) the required bindings/

ciao,
Marco


,= ,--. =.
((
/)o o(_)) jabber:[email protected]/msn:[email protected]
-'(. .)-’ #removed_email_address@domain.invalid
_/ There’s no one inside that flat, everybody knows it


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

Marco Milanesi azt írta, hogy:

require ‘rsvg2’
require ‘gtk2’

Gtk.init

gdk_pixbuf = RSVG.pixbuf_from_file("./mysvg.svg")

Gtk::Window.new.add(Gtk::Image.new(gdk_pixbuf)).show_all

Gtk.main

And is it easy to put on a CD? (there is a not so easy explanation on
the site to make a ruby executable…)

Gergo