svg

Gradient servers as external files in SVG

Hi, the fill property in SVG accepts an url to point to a gradient/pattern element, an instance of a so-called 'paint server'. The Question: Is it possible in any browser (that is, not IE, of course), to use a gradient defined in an external SVG file? Like, in rect.svg, <rect fill="url(grad.svg#my_grad)" /> and the corresponding <li...

SVG Linear Gradient Scale and Translation Question

I have the following radial gradient: <radialGradient inkscape:collect="always" xlink:href="#linearGradient2454" id="radialGradient2460" cx="4022.8572" cy="5451.2656" fx="4022.8572" fy="5451.2656" r="3559.865" gradientTransform="matrix(-0.1071067,-0.1166362,0.1377765,-7.0459663e-2,276.61943,1452.439)" gradi...

SVG draggable using JQuery and Jquery-svg

I have an HTML 5 page where I load an svg circle. When I click on the circle I create another small circle where I click. I want to be able to drag the second circle but cant seem to do it with jquery-ui .draggable(); I am able to move the circle by accessing its cx and cy attributes so there must be a way to drag it. <!DOCTYPE HTM...

Inline SVG in HTML, with Firefox 3.5

Hi, I'm trying to create some mixed HTML/SVG content and having some trouble. The HTML content shows up as expected, but the inline SVG does not. So, I do some experiments. I find sites which have examples of inline SVG, and they render correctly on my system. So, I "view page source" and copy/paste the HTML/SVG into another local file...

Simplest way to clear a container using raphaeljs javascript graphical library

I have to clear and redraw a raphael javascript main container. I've tried with var paper = Raphael(10, 50, 320, 200); paper.remove(); // Doesn't work paper.node.removeNode(); //this neither paper.removeNode(); //this neither Any idea? ...

Rotating 3D cube perspective problem

Hi, Since I was 13 and playing around with AMOS 3D I've been wanting to learn how to code 3D graphics. Now, 10 years later, I finally think I have have accumulated enough maths to give it a go. I have followed various tutorials, and defined screenX (and screenY, equivalently) as screenX = (pointX * cameraX) / distance (Plus offsets ...

web link in svg

Hi all. I need to have a linked text inside a svg graph. Here is what I did <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="138pt" height="188pt" viewBox="0.00 0.00 138.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"&gt; <g id="graph0...

Can I use mixed units with 'path' element?

SVG has a rectangle element which dimensions could be specified in percent of dimensions of its owner and radius in pixels. So by doing the following <div style="position: relative;"> <object class="AIRound" type="image/svg+xml" data="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'&gt;&lt;rect x='0' y='0' width='100%' height=...

Hyperlink over embedded SVG

I have a page with an object tag that contains a SVG. Is there an easy method to make it clickable (in order to show a larger version in a popup when clicked)? ...

Calculating SVG paths

Hi guys I have a quite complex image map (made up of over 150 pieces) and I want to convert the coords within the map to SVG path standard format. The reason why is I want to use the following instead of an image map http://raphaeljs.com/australia.html. But I need the coords to be in SVG path standard format. How can I convert an imag...

Using JavaScript to model 3D polyhedra

Is there a JavaScript library that models 3D polyhedra using the canvas tag or SVG? Say I wanted to produce renderings of the Platonic solids, how would I best achieve this? FWIW, I'm only concerned with WebKit-based web browsers such as Safari and Chrome. I've seen this cool demo of how to render 3D triangles, but how might I extend it...

SVG to JPEG via PHP4

I am currently struggling with a side project I hope you can help me with. I am trying to convert SVG images to JPEG with PHP4. Originally I tried to interface java with php via the php_java.dll and jar that comes with PHP 4.2.2 but while I never got any warnings I never managed to get even the simplest test working. All text regarding...

SVG Parser in Javascript

I believe that at one point, I saw a TinySVG implementation that worked in the browser, using the canvas element as the backend. I found a few sites that appeared to indicate it was at http://fuchsia-design.com/CanvaSVG/, however, that site appears to no longer exist. Is this project (or a similar one) still on the web anywhere? ...

Importing SVG into an RMagick RVG session

We have some code that draws things using RVG in RMagick. We scale them at various sizes. What I'm trying to do is use a file that's saved as an SVG as a template. The problem is, is when I load an SVG using Magick::Image.read, and then 'use' it, it rasterizes it, and then scales it, instead of producing pretty vectors. Is there a way ...

Convert SVG to PNG in Ruby

I need to convert SVG content to a raster image (preferably a PNG) in a RoR app. Is there a direct method that doesn't involve ImageMagick, or is this the de facto standard? ...

IE7 is requesting for msxml3.dll ActiveX control while trying to display SVG charts

Hello, We inherited a new product that we are now supporting. It is a web application that displays chart(s) using SVG. On my machine, it runs perfectly. It loads and shows the SVG charts using Adobe SVG viewer 3.0. While on the customer machine, the SVG charts wont load. I noticed that the web application is requesting for MSXML3 Act...

using svgz in html server

Hi, I use chrome to visualize a svg file which I put on a server, that works fine. Here's the dead simple html for it: <a href="test.svg">svg</a> However, when I try to use svgz instead, it doesn't work. Here's the code I use: <a href="test.svgz">svgz</a> Here the error: This page contains the following errors: error on line...

How to embed SVG tag inside google wave gadget?

I'm creating a google wave gadget that needs to embed SVG. I don't want to do because that means I need to generate separate svg file and store somewhere on the web. I would like to simply add inside the Google Wave Gadget. The person who created the Canvas Gadget (Source Code) has done this, but I can't figure out what he did to get...

SVG images in an iPhone application

Hi all, I'm looking for a small tutorial that can help me use svg images in iphone application. I'm trying to learn about svg format, and would love to know if there is relevant material from apple out there? particularly, w.r.t. iPhone. Are there any open source libraries, or frameworks in iPhone SDK 3.0+ for SVG? Any help is appreci...

Exporting GIMP paths to .svg question

I used the guides on a GIMP file to create a path which is just straight lines - no curves or anything. However, when I export the path, the SVG code uses "C" the curve indicator to draw the path. So part of the code looks like this: <path id="Unnamed" fill="none" stroke="black" stroke-width="1" d="M 400.00,1230.00 C 400...