Questions tagged [svg]
Scalable Vector Graphics (SVG) is an XML-based two-dimensional vector graphics format that can also be used in HTML. Do not add this tag just because your project uses SVG. Instead, add the tag if your question is either about SVG or closely related, like how to achieve something with SVG.
14,270
questions with no upvoted or accepted answers
28
votes
0
answers
5k
views
avoid overlapping arrows in plantuml class diagrams
I am using plantuml for creating the class diagrams along with arrows and messages on the arrows. It works perfect untill the diagram is huge. In large diagrams where there are multiple arrows and ...
17
votes
1
answer
2k
views
Cache/preload SVG files react native
I'm using React Native SVG and using the implementation with svg files (url to implementation).
Is there any way to preload/cache this svgs? I have a component that imports several SVGs and it freezes ...
15
votes
1
answer
9k
views
Include one SVG inside another
Is it possible to include one SVG inside another without rasterization effects? I've tried this
<svg version="1.2" width="600.0pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/...
14
votes
0
answers
3k
views
Text font issues with rsvg-convert
We were using rsvg-convert for SVG to PDF conversion and it was working like a charm, till we encountered text.
Here's an example-
Command: rsvg-convert -w 842 -f pdf -o testing.pdf testing.svg
...
13
votes
1
answer
1k
views
How can I remove glyphs from a WOFF?
Are there any javascript libraries that can shrink a WOFF (and WOFF2) font down to only the glyphs used in an SVG image? For example, given a font and an array of strings it will return the bare ...
13
votes
1
answer
2k
views
How to get vectors drawables with gradients to work in < API 24?
I am writing an app where it uses vector drawable with gradient tags extensively.
What are the steps I need to take so that devices with different API levels could work with these icons without us ...
12
votes
0
answers
2k
views
In SVG, what's the difference between using <symbol> versus using an object defined in <defs>?
In SVG, a re-usable graphical object can be defined using <symbol> and referenced using <use>, but the same thing can be achieved by defining the graphical object in <defs>.
For ...
12
votes
3
answers
8k
views
SVG to CDR converter
I have an SVG file which contains rotated, semi-transparent, clipped (clip-path) elements (e.g polygons, images). This file is perfectly working in Inkscape but for further image processing I would ...
11
votes
2
answers
4k
views
How to use a simple SVG filter on Safari with acceptable performance and without crashing?
Disclaimer: This post is half question and half report of my experiments while trying to find a solution.
The Task: Simple SVG Filter on a Monochrome Rectangle
Using a filter to change or modify the ...
11
votes
0
answers
3k
views
SVG>PNG from canvas.toDataURL throws DOM exception 18 security error in Safari 9.x
I'm creating a dynamically-generated SVG from HTML text content. It works fine in Chrome but Safari consistently throws an error when the SVG data is converted to PNG for downloading.
What has me ...
11
votes
1
answer
4k
views
Creating a VectorDrawable from an SVG file at runtime
I want to create an VectorDrawable from a remote SVG file (ie a URL), within my app (not in Android Studio). After a bit of searching, I have yet to find a way to do this programmatically, is there ...
10
votes
0
answers
2k
views
How to create sankey diagram with gradient color links in Plotly?
Is there a way to make the links in a Plotly Sankey diagram have a color gradient between the source node color and the end node color? This image is taken from a page linked by the Plotly ...
10
votes
1
answer
1k
views
Performance: Native SVG elements or HTML elements in a <foreignObject>?
I am writing a web app which renders a graph that holds ~700 nodes and their respective edges. Each node is displayed as a circle and inside of it is contained a block of text, a background image, as ...
10
votes
1
answer
4k
views
"Flatten" transform down to Path?
Given the following SVG:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="1891px" height="1492px" viewBox="0 0 1891 1492" version="1.1" xmlns="http://www.w3.org/2000/svg" ...
10
votes
0
answers
28k
views
Converting svg to json
I want to be able to create a svg image in Illustrator and convert it to json to be able to use it with Raphael js, as below.
How could this be done without a server side script?
What I want:
[0,0,...