Consider the following svg snippet:
<linearGradient id="redgradient" x1="0%" x2="0%" y1="0%" y2="100%">
<stop offset="0%" stop-color="#ffffff"/>
<stop offset="100%" stop-color="#ff0000"/>
</linearGradient>
<rect x="0" y="0" width="400" height="400" fill="url(#redgradient)"/>
Is there a way of specifying that the colours should...
I'm working on a project where I'm looking to store raw svg data inside my mongodb. Right now, it appears a bit goofy because I need to escape the svg string like so:
{ "_id" : ObjectId("4c61e60d4d02da615f175b6e"), "name" : "Triangle", "svg-data" : "<?xml version=\"1.0\" encoding=\"utf-8\"?> <!-- Generator: Adobe Illustrator 14.0.0, SV...
I cannot get Raphaël working in a UIWebView.
I load a simple HTML-Webpage with this content:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
<script src="js/lib/raphael-min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
alert("" + Raphael)...
I'm using Google closure to create a simple interactive graphic in HTML/JS to be viewed on iPad Safari.
The code sample below shows expected behavior on Safari Mac and all other major browsers (a circle appears that when clicked generates a console message), but not Safari iPad. No event handler is registered with the circle. Instead, a...
I have the beginnings of a jigsaw demo in SVG that works in Opera, Chrome, and Safari, but not Firefox: the background rect shows, but the pieces are all entirely missing.
The pieces consist of a path element whose fill property references a pattern that in turn contains a copy of the image translated so that the correct part of the ima...
Hi there,
I want to create inline SVG graphics using Javascript.
However, it seems like createElementNS function applies some normalization and transforms all tags to lowercase. That is fine for HTML but not for XML/SVG. The NS I used is http://www.w3.org/2000/svg.
In particular I have problems creating a element. As it will be appen...
Hi, I need to animate an attribute of an SVG element, which has no CSS counterpart -
<circle cx="..." /> How can I achieve that?
Or, I can use an alternative, e.g. if I could animate <g/> using CSS's top or similar.
Any experience?
Thanks, Ondra
Note this is not a duplicate of http://stackoverflow.com/questions/911357/how-can-i-anim...
Hi,
I render a huge SVG file with a lot of elements with Cairo, OpenGL and rsvg. I draw svg on cairo surface via rsvg and create an OpenGL texture to draw it. Everything is fine. And now I have to interact with elements from SVG. For example, I want to guess an element by coordinates. And I want to change the background of some path in S...
http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg
is it possible to increase the size of this map?
...
I'm working with jQuery to modify some svg files data on the fly... one of the things I need to do is modify the "viewBox" attribute. When using jQuery as in the snippet below, however, it is doing a toLower() on the attribute so "viewBox" becomes "viewbox". Normally I wouldn't care but this seems to break svg rendering (at least on Ma...
Does anyone know if SVG is working in a recent version of IE?
...
I tried importing the SVG XML Schema into EMF, to obtain the SVG metamodel in ecore. However, the import failed due to the schema not being valid: indeed, svg.xsd references XMLSchema.dtd, which itself references datatypes.dtd, which does not exist!
Consequently, I tried downloading the necessary files from the svg website (svg.xsd, XML...
i am trying to open this site in IE:
http://www.petercollingridge.co.uk/data-visualisation/interactive-svg-map
and it is not showing the SVG on it
how do i get it to work with IE?
...
Hi all, I'd like to export SVG graphics from R. There appear to be two alternatives: RSvgDevice and Cairo. Can anyone comment on these packages? Is either the default, or clearly better than the other?
Many thanks,
...
I'd like to generate SVG images (e.g. general artwork, not just charts or graphs) using Python. What's the best Python SVG library that supports broadest range of SVG's feature set?
...
In my app I load different SVG files and need to zoom them. As I see it I need to apply a transformation matrix to an element to have it zoomed, but this doesn't work on SVG element, so I need to wrap everything in a <g> and transform it instead.
So my question is is it safe to do this? Is it allowed for elements like <defs> be not im...
I just started a project using the Canvas. But one of the things I need is to keep track of movable, clickable boxes as in this example : http://raphaeljs.com/graffle.html so I'm wondering if Raphael-js + SVG would be better.
Which would you use? And why?
...
I'm searching for a library that will allow me to perform graphical manipulations on SVG files. By "manipulations" I mean things like:
Merge two overlapping shapes into a single shape
Find the geometric center of a shape
Draw a copy of a shape that is 25% of the original shape's size
...and other sorts of things that one can do in I...
i have a map of the US:
http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg
i am trying to embed this code in it:
http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/
as you can see it has CSS and javascript
however, i am having a very diffficult time trying to p...
I have several SVG paths looking like this:
M204.21121687607624,196.94037184487675L329.92080751248244,195.46306542867487A130,130,0,0,0,244.46261863233696,77.83995929783192Z
M198.39145828733604,195.04941765207442L235.83285625620988,75.03597952801854A130,130,0,0,0,97.55860203112616,119.9640082076644Z
I now want to add another path, ...