Y
Yotta Meter
The example I'm looking for in regards to ruby/SVG differs from the
previous questions. I have an SVG document generated from Adobe
Illustrator, and I'd like to not only display the SVG document using
ruby, I'd like to modify it within the ruby program and re-display the
image.
As an example, say I have two nodes connected with and edge, node0,
node1, and theEdge. In Illustrator I draw the two nodes and edge with
the color black. I write out the file to file.svg
I'm able to to open the file in a web browser and view the image
correctly.
For ruby, I'd like to be able to use Tk to show the image on a canvas.
Once an event is processed, I'd like to change the color of node0 to red
from black, with node1 and theEdge staying black. I'm assuming I could
use REXML to change the property of node0. My hope is then to re-display
the SVG image, replacing the original.
Ideally I'd like to be able to detect mouse over events on individual
elements of the SVG document.
I'm going to start attempting to do this - if I am going down a rathole,
I'd appreciate feedback!
Thanks in advance.
previous questions. I have an SVG document generated from Adobe
Illustrator, and I'd like to not only display the SVG document using
ruby, I'd like to modify it within the ruby program and re-display the
image.
As an example, say I have two nodes connected with and edge, node0,
node1, and theEdge. In Illustrator I draw the two nodes and edge with
the color black. I write out the file to file.svg
I'm able to to open the file in a web browser and view the image
correctly.
For ruby, I'd like to be able to use Tk to show the image on a canvas.
Once an event is processed, I'd like to change the color of node0 to red
from black, with node1 and theEdge staying black. I'm assuming I could
use REXML to change the property of node0. My hope is then to re-display
the SVG image, replacing the original.
Ideally I'd like to be able to detect mouse over events on individual
elements of the SVG document.
I'm going to start attempting to do this - if I am going down a rathole,
I'd appreciate feedback!
Thanks in advance.