All Questions
1,069
questions
0
votes
0
answers
25
views
Why does SVG load in Chrome and Safari but not Firefox? [duplicate]
I have the following code:
const svg = new Image();
svg.src = "https://svgur.com/i/soR.svg";
const ctx = document.querySelector("canvas").getContext("2d");
function drawImage() {
ctx.drawImage(...
1
vote
2
answers
372
views
SVG <image> tag not exported to canvas
I have an issue exporting an SVG with image tag through a canvas element to PNG. Apologies if this has been asked before but I could not find a relevant question myself.
The svg and code example below ...
0
votes
0
answers
100
views
SVG conversion via Canvas API with foreignObject does not work properly
I would like to publish my app beside Android on Apple devices as well. Unfortunately I have a problem with the "porting" that I just can't solve. My app is running great on Android.
The ...
0
votes
1
answer
135
views
HTML: draw cubic Bézier curve in multiple colors
I am working with Bézier curves in HTML.
I have a cubic Bézier curve that I want to draw in multiple colors (color 1 from t = 0 to t = x, color 2 from t = x to t = 1). I could do this either with ...
0
votes
0
answers
259
views
React: use SVG, map or canvas for my app, flickering issue
Im creating an app of booking seats for the local stadium. There will be thousands of places, and I need to handle displaying them, and handling events, like clicking, disabling. My idea is to have ...
-1
votes
1
answer
96
views
Scaling Canvas Resource in ViewBox
I'm trying to get a reusable SVG image into WPF.
I have a merged dictionary which contains an entry for an external xaml file which contains a canvas, which in turn came from an SVG file. It has a ...
0
votes
1
answer
119
views
Upload an image from a canva javascript to an SVG
Here's the beginning of my codeI made some plots in a javascript canvas and I would like to be able to download them in svg format directly to my computer's hard drive. So I made a button, and a ...
-2
votes
1
answer
441
views
How can I make a Venn Diagram with values inside each component using SVG, CSS, or Canvas [closed]
I am trying to recreate this diagram in pure SVG (most preferred method), CSS, or through a Canvas (least preferred option). So far I can create 3 overlapping circles and add a value in the center of ...
0
votes
0
answers
308
views
PaperJS: Join multiple path objects to create a single path object
Lets say I have multiple path objects of various shapes and sizes, that intersect with one another, like those in the [Hit Testing example][1]. Assuming I have a few of them selected at the same time, ...
0
votes
1
answer
293
views
how to draw a rect with diagonal lines with konva or svg.js and the lines is even spacing fill the rect
*The Scenes:*
I use konva to draw a diagonal line in a rect,
the rect api fillLinearGradientColorStops meet my need ,
when the value of fillLinearGradientColorStops Array length is smaller 200,the ...
0
votes
1
answer
83
views
Some SVG files are rendered while others are not
I am loading an svg file and then drawing it on a canvas. This is part of my code:
svgDocument = xhr.responseXML;
map = new Image();
map.src = "data:image/svg+...
0
votes
2
answers
1k
views
Modify Canvas SVG Image with Javascript
I have a svg image that I can use to draw to canvas:
image = new Image()
image.src = "image.svg"
Is it possible to modify image to, for example, change the colour of an element?
0
votes
0
answers
524
views
Leaflet map renderer L.svg changed already existing canvas markers
I have set renderer value L.svg with a padding of 100 for map as shown below
Before setting this option canvas markers were visible like this
After setting renderer option markers are visible like ...
1
vote
1
answer
336
views
Is there a way to change the image(base64) fill of an svg path useing js?
I'm generating an image using canvas. I would like to use that image to fill an SVG path background. Only part of the SVG.
I have tried:
<path id="path1" class="st1" d="M80....
1
vote
0
answers
56
views
Why, when using canvas.toSVG(...) from the FabricJS library, do text boxes move to the right in the exported SVG?
I'm building a web tool that allows users to make use of FabricJS and place SVG's and wording on a canvas like normal. All seems to work ok apart from when I canvas.toSVG(..)
This image shows the ...