Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
55 views

can you please tell me how to calculate the compression of a rectangle in svg. let's say there is a rectangle with x0, y0, w100, h100, r45, it is in an imaginary box, I have reduced this box by 50px, ...
ghtx280's user avatar
  • 51
0 votes
2 answers
65 views

I wanted to add a simple SVG example that is manipulatable with SVG.js I tried this. <main> <section class="center"> <h1>Hello!</h1> <p>This ...
KYUNGMIN CHOI's user avatar
0 votes
2 answers
215 views

I am trying to figure out how to use SVG.js to draw text. In my attempt below, the text is being created and drawn, but only a few dots show up. This must be part of the text being drawn, but it is ...
Eric G's user avatar
  • 796
-1 votes
1 answer
72 views

I am working out bugs in an SVG editing program. So far most images import correctly, but I'm having problems with gradients. A working version of the code is at geewhiz.ai The following image does ...
GeeWhizBang's user avatar
0 votes
0 answers
57 views

I am using SVG.js and trying to fetch the bounding box of a transformed text. I made a small example of my use case: this.draw.attr({ width: 200, height: 200 }); const text = this.draw ...
Mat's user avatar
  • 491
0 votes
0 answers
97 views

enter code hereI have a problem. I'm trying to write code. The goal is that if two svg shapes possibly intersect, they cannot intersect. But my code works out so that if the shapes intersect, they get ...
MaksSTV's user avatar
0 votes
0 answers
56 views

I'm working on a site that uses matter.js in a particular section to add some floating shapes to the background of the div. One of the shapes is a semicircle, which I used svg.js to create the shape. ...
Jono's user avatar
  • 51
0 votes
5 answers
694 views

Is it possible to transform any SVG into a solid black shape in an automated way (in javascript or otherwise) by simplifying the path? Is there a library to do this, or is there another way? Let's ...
Dady's user avatar
  • 111
1 vote
0 answers
72 views

I am putting text in textbox and selecting shape to fit into. For now I am getting canvas image that is not too clear. I am planing to change my canvas into SVG image format. For Example here I want ...
Sukhpal Singh's user avatar
0 votes
1 answer
49 views

There are 2 cases with undefined behaviors of Text object positioning. First Case For example I want to position Rect at (50, 30) and Text at (0, 30) coordinates. var draw = SVG().addTo('#app') var ...
Lamens's user avatar
  • 39
0 votes
1 answer
145 views

With the this code i create a timeline and bind it to a svg element and want a function to run after the timeline is completed and then reverse back to initial state. As documentation use ... var ...
starrezzy's user avatar
1 vote
0 answers
158 views

I have successfully gotten a rectangle to move along a path but have not been able to have it rotate and scale while staying on the path. The moment i specify the rotate and scale attributes it ...
starrezzy's user avatar
0 votes
1 answer
83 views

I have an SVG.js canvas that has a nested artwork and a nested UI on top that controls it. I want to export the artwork which is clipped. The issue is the Defs and SVG headers are at the root so they’...
MaxVolts's user avatar
0 votes
2 answers
75 views

I have come across a working example of using SVG.js version 2.5.0 for moving a rectangle along a path in jsfiddle. I am trying to duplicate the same behavior but in SVG.js version 3.0.5 but keep ...
starrezzy's user avatar
1 vote
2 answers
71 views

I have this structure: ___________________ | g1 __________ | | | g2 | | | | | | | | ____ | | | | | r1 | | | | | |____| | | |__________| | |...
helloworld's user avatar
  • 2,341
0 votes
2 answers
222 views

I have a white inner circle and a blue outer circle. I am trying to clip out the white inner circle to leave a blue ring. (I know I can achieve the same thing using a single circle and a stroke, but I ...
J-C's user avatar
  • 31
0 votes
1 answer
98 views

I want to make the rect move and rotate togther, but the result is not as expected, so how to realize my requirement ? var ele = document.getElementById('svg_1') var btn = document.getElementById('...
wpindesign's user avatar
0 votes
1 answer
102 views

Is it possible to "apply" a transform to a node using SVG.js? I'm not asking about how to add a transform attribute to a node, but recalculate that node's coordinates so the transform itself ...
Nik I.'s user avatar
  • 187
2 votes
1 answer
1k views

I am trying to translate specifications from Photoshop to svg filters. The recipe is: Filter > Pixelate > Color Halftone All 4 channels 45 degrees Radius of the dots between 5-8 The process, ...
dotnetCarpenter's user avatar
0 votes
0 answers
102 views

I want to create a web application consisting of a header, footer, and left and right sidebar layout, where the size is set according to the children, and a main container that fills the rest of the ...
kai-dj's user avatar
  • 345
0 votes
1 answer
293 views

I am using svg.js to generate a dynamically-resizing control panel. I'm also relatively new to JavaScript and this project is a learning exercise, please forgive my early-stage ignorance. I have been ...
bob_pdx's user avatar
0 votes
0 answers
27 views

I'm trying to create a data URL from my draw.svg() but the SVG.Use images aren't included. First image is SVG with defs / use tags The second image is the result of: "data:image/svg+xml;base64,&...
Dupdroid's user avatar
  • 115
0 votes
1 answer
478 views

*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 ...
Cognia's user avatar
  • 520
1 vote
2 answers
385 views

I want to load an SVG from a file and then place it in an existing HTML SVG element (i.e, a group) using svg.js I am facing two issues: How to load SVG from a file using svg.js? Add the loaded SVG to ...
Stefan Walter's user avatar
0 votes
3 answers
271 views

I have a SVG with path <svg width="100" height="100" stroke="black" fill="transparent"> <path d="M 10 10 H 90 V 90 H 10 L 10 10"/> </...
Manoj A's user avatar
  • 431
1 vote
0 answers
32 views

I have a routine that attaches an image to my SVG canvas and on load, it creates a rectangle with rounded corners so I can clip the image. This is run multiple times, fed by an array of image ...
RieMars's user avatar
  • 51
0 votes
1 answer
120 views

I have created a little sandbox to test this out but according to the docs I should be able to import an SVG using svg.js using https://playcode.io/1024624 mounted() { this.$nextTick(() => { ...
Luke Snowden's user avatar
  • 4,236
0 votes
0 answers
218 views

How can we add svg file to a pdf file proramatically using c# or Js Should not use any third party library
KJohn's user avatar
  • 1
-3 votes
2 answers
1k views

I have an super large svg background and some elements are rendered on top of the background. I then want to crop the svg such that it fits the elements in the foreground and the background is cropped....
J. Doe's user avatar
  • 375
0 votes
0 answers
33 views

This is what I am trying to do: import { SVG } from '@svgdotjs/svg.js' const SVGpaper = (props) => { useEffect(() => { let canvas = SVG().addTo('#canvas').size(6006, 600); canvas....
J. Doe's user avatar
  • 375
0 votes
1 answer
111 views

I have a code that is only rendered after some data is fetched from server and variables are set. When using svg.js, it uses SVG.AddTo("#someID"), but the div containing the ID has not been ...
J. Doe's user avatar
  • 375
0 votes
1 answer
65 views

Sorry if my question seems weird, but I am quite new to javascript/nodejs/react, and can't really achieve the following: I made a module that uses SVG.js to generate SVG-s, and I would like to use it ...
Mat's user avatar
  • 491
0 votes
0 answers
35 views

when I set viewbox(0,0,100,100) and I then set some text draw.text('Hello Word').y(100) when I console log y its 115.3996229171753 i was expecting 100? Thanks in advance. const svg = SVG().addTo("...
James's user avatar
  • 1,485
0 votes
1 answer
305 views

I am trying (in javascript) to access parts of a list of SVG components in a little test page, but I am not sure I can achieve what I want this way. The main question is: Can I have sub-components ...
Michel's user avatar
  • 11.9k
0 votes
2 answers
541 views

I am trying to scale my SVG down width 0.5 and then draw a line from positive to negative coordinates, but it seems that it renders only to x:0 and y:0. Does SVG.jsnot support drawing with negative ...
Stefan Walter's user avatar
0 votes
1 answer
439 views

createSVGPoint()i getSVGPoint {x: 0, y: 0}however using svg.js syntax withnew SVG.Point()it consolesot {x: 0, y: 0}` Using svg.js method im not able to call matrixTransform(svg.getScreenCTM().inverse()...
James's user avatar
  • 1,485
0 votes
0 answers
282 views

I am trying to get the javascript for animating an svg element along a timeline to work like i used it with SVG.js version 3.0.16 But the only available version that js fiddle has is 3.0.5 My end ...
starrezzy's user avatar
0 votes
1 answer
55 views

I seem to be able to accomplish anything I want in Firefox. But Chrome seems to be mostly broken. For instance svgObj.findOne("#myNode").on("click", function) works in Firefox, but ...
user1529413's user avatar
0 votes
1 answer
1k views

Example on the Internet, they can call objects in svg files easily. But i cannot reach them. Here is my html code`` <html lang="en"> <head> <title>SVG Example</title> ...
theredboy's user avatar
  • 102
1 vote
1 answer
79 views

I made a scale animation test: var btn = document.getElementById('testBtn'); var stopBtn = document.getElementById('testStop'); var runner; var startSize = 20, endSize = 80; const start = ...
wpindesign's user avatar
-1 votes
2 answers
747 views

I have a svg of letter B here is the code: <svg id="logo" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 84 96"> <title>Logo</title> <g transform="...
Nasyx Nadeem's user avatar
1 vote
1 answer
557 views

I am trying to change the start position of an svg image to animate it along a path using animateMotion You can check the current result here https://jsfiddle.net/7espvwuz/ In this fiddle I am using a ...
Amine's user avatar
  • 2,468
0 votes
0 answers
36 views

I have 3 identical SVGs displaying on my page. But they are placed dynamically (I'm using WordPress, with a plugin that inlines all SVG images). I'm using them to show percentages of different ...
Laura Sage's user avatar
-1 votes
1 answer
144 views

I have a page that will show several svg images that will be generated from json data. I created a javascript class that will generate the svg but I don't know how to add it to the dom. As a simple ...
kuru's user avatar
  • 107
0 votes
1 answer
45 views

First attempt at animation in svg.js. Very straightforward, and it works fine standalone. Just animate drawing a line from A to B. Start with a zero length line at A, animate the endpoint to B, ...
A_Curmudgeon's user avatar
1 vote
1 answer
203 views

I wish to have animations that are controlled by buttons. My idea is to have a number of timelines which I can play() eg when the correct button is clicked. I'm new to this library and am confused ...
drex's user avatar
  • 56
0 votes
2 answers
213 views

Im trying to programmatically create an SVG polygon with a function by adding to the polygons array using svg.js using the following code: const draw = SVG().addTo('body').attr({ viewBox: '0 0 100 ...
James's user avatar
  • 1,485
0 votes
1 answer
81 views

Hi I am using the function createPoint to animate a polygon using gsap. I am also using svg.js If I use vanilla javascript to get the points of the svg with var polygon = document.querySelector("...
James's user avatar
  • 1,485
3 votes
2 answers
6k views

I'm using SVG.js and want to draw an invisible border around a shape. I use the stroke() method to do this, and I thought just setting the opacity option to 0 would work fine, but the problem is that ...
Starry Sky's user avatar
0 votes
1 answer
223 views

I'm using the SVG.js library in my project and I'm trying to move a group containing some rect, text and one use element in x direction: // create symbol, symbol can be anything const symbol = svg....
MarSim's user avatar
  • 13

1
2 3 4 5
9