svg

Does anybody know of a good beginner's tutorial on SVG?

Hi Guys, I was looking for 1) a tutorial and 2) a comprehensive reference on SVG. Does anybody know of / has used a tutorial or reference for SVG? EDIT: Thanks guys! This was very helpful. I hope this is useful for others on SO as well. ...

SVG rendering some paths without color, only black silhouettes, and only in FireFox.

SVG rendering some paths without color, only black silhouettes, and only in FireFox. Using Jquery SVG , only some groups are showing up with color. I'm using Adobe Illustrator, exporting SVG 1.1 . Any ideas? ...

Allow SVG graphics to overflow outside the containing svg element

Hi, I'm using the Raphaël—JavaScript Library to create some pie chart graphics, but I want to set the overflow of the containing SVG element to visible, to allow the graphics inside to display outside of their container. The way you would with normal dom elements (overflow: visible;) does not seem to work for svg containers. Does anyone...

SVG not working when access on localhost. Why?

Does anybody know why the same code from this page http://emacsformacosx.com/ would not render when hosted on a local tomcat server? I am trying to play with some SVG but can't see to make it work locally. Any ideas? ...

Codebase for making a Flash-based interactive map with SVG vector data?

I'm looking for a way to take SVG path info (basically a string of coordinates) and dynamically draw it with Actionscript. Icing on the cake would be if those shapes could detect mouse events to trigger JS and dynamically change their appearance (fill, stroke, etc...). I'm currently trying something similar to this (http://raphaeljs....

Embedding SVG in XUL

I want to Embed SVG into XUL. I tried to use the this tutorial which requires pasting of the SVG code in XUL application and it works but this is not clean. I want to keep SVG and XUL files separate, further I will like to use a separate CSS file for SVG part, any examples how we can do this? ...

Creating SVG graphics using a server side script (PHP)

Hi Guys, Is there a way to generate an HTML file using a PHP script which has an SVG embedded where the SVG itself is dynamically generated by the PHP script? Basically, I want to display a dynamically generated SVG image to a client but <embed>, <object> as well as <iframe> only refer to external sources while PHP generates the curren...

Embedding the output of a server script inside another HTML page

Hi Guys, I have a php script (generator.php) which generates certain HTML/XML/SVG depending on various conditions. I want to embed the output of this script in my homepage (home.php) eg. Let generator.php always generate an SVG document (complete with SVG NS and DTD). Now I want to embed this generated image in the output of home.php ...

dojox.gfx bounding box for Text and Group nodes

The documentation for getBoundingBox() in dojo says: Returns a bounding box of a shape. A text shape is a point-based object, so it doesn't define a bounding box. I don't get it. Any sane implementation of vector graphics for the web includes bounding box for text objects (raphaelJS and jQuery SVG that is)! What does "a point b...

Consistently change background colour upon hovering over an SVG link

Hi, I decided to play around re-making a nav menu in SVG. It looks quite a bit like this site's nav actually, so nothing much to imagine. I'm drawing boxes with SVG and then placing text over them, enclosing them both in a link. By attaching a css class to the box, I can set a :hover attritbute, so I can change the background colour wh...

Are there any mature vector drawing libraries for Python? (that work on Windows)

I've tried endlessly to get pycairo to work on Windows, but version 1.8.8 won't install. Is there something comparable out there that actually works on Windows? ...

SVG onmouseover for group with overlapping elements occurs twice

When attaching a function to the onmouseover event for an SVG group <g>...</g>, the event occurs once, each time the pointer enters to an element in the group. This occurs even if two elements in the group appears one inside another. For example: +-----+ |A ___| | |B | |__|__| When the pointer enters the A rectangle, and from ther...

Problem with dynamic SVG image generation

Hi Guys, I am trying to write a server side script (PHP) for generating an SVG image based on user input. I am using the following code: <?php echo '<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt; <head><meta http-equiv="Content-Type" conten...

Where does come the offset in Raphael javascript

I really like the Raphael Javascript library which is very useful for handling SVG with javascript. However there is an offset value which is added to the generated svg code that I don't understand. Does anybody know where does it come from and how to avoid it? Here is my JS code: var paper = Raphael("canvas", 510, 510); paper.clear()...

SVG Absolute coordinates?

Hello, I have some SVG files which have many text nodes in them. I would like to get the absolute position of each of the text nodes, within the SVG document (the SVG documents have width="743.75" and height="1052.5"). An example text node looks like this: <g> <text transform="matrix(1,0,0,-1,106.5,732.5)"> <tspan x="0 7.897999...

svg text element width

I'm working on some ecmascript/javascript for an svg file and need to get the width and height of a text element so I can resize a rectangle that surrounds it. In html I would be able to use the offsetWidth and offsetHeight attributes on the element but it appears that those properties are unavailable. Here's a fragment that I need to w...

How to determine the length (in pixels) of a string being renderred on a web page?

Hi Guys, If I know the font size (12) and the font family (calibri), is there a way to determine the length (in pixels) a given string will take after it will be rendered? I am absolutely certain that the said font would be used. Are there any lookup tables for this purpose to determine the length in PHP code itself? I am writing a PHP...

html5 canvas element and svg.

Why do we need the html5 canvas element, when the same can be achieved through embedded svg? ...

Metadata in SVG

Hi, Is there a way to attach metadata directly to a grouping element () in an svg file? I couldn't find anything about that in the specification or elsewhere on the web, so I assume it's not possible. Perhaps there are other ways to attach element specific metadata within the svg file... What I try to do is to create a map and attach i...

SVG iframe embed and clickable links: how to target the _top ?

I need to display a svg image (on which I have no control on) on a page I have control on. This svg image has links, but when I click on them, the page is opened in the iframe. A solution would be to write target="_top" in the svg link, but I have no control on that file. Is there a way to have the links open in the parent page (as it w...