How to draw curved SVG with single path?


Weber

What I want is in the image below -enter image description here

I have 3 relative questions about this

1. We can use single path. Paint the entire canvas ?

2. If we can only use multiple paths to draw the whole, will it be convenient to animate them?

3. In both cases, who can kindly guide the correct handling of the samples?

Here's what I've done so far...you can see not being an expert SVG, of course you can use a circle for the big dots. Thank you in advance.

svg {
  width: 100%;
}

.straightLine {
  height: 3000px;
  position: relative;
}

.st0 {
  fill: none;
  stroke-dashoffset: 3px;
  stroke: #000000;
  stroke-width: 5;
  stroke-miterlimit: 10;
}
<div class="straightLine">
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1280 1000" style="enable-background:new 0 0 1280 800;" xml:space="preserve">
	<g class="all">
	<path id="line1" class="st0" stroke-dasharray="10,9" d="M 35 -17 C 0 190 50 83 600 109 "/>
	<path id="line1" class="st0" stroke-dasharray="10,9" d="M 600 109  c 64.9 0 90.4 40.5 90.4 90.4"/>
	</g>
  </svg>
</div>

Phylogenetic

Use something like:

<path d="M 20 0 v 20 a 30 30 0 0 0 30 30 h 600 a 40 40 0 0 1 0 80 h -140 a 30 30 0 0 0 0 60 h 200 a 40 40 0 0 1 0 80 h -100 a 30 30 0 0 0 -30 30 v 20" />

As the documentation shows , a path can contain any number of components.

in conclusion:

M/m    Move current position
L/l    Draw a line
H/h    Draw a horizontal line
V/v    Draw a vertical line
C/c    Draw a cubic Bezier
Q/q    Draw a quadratic Bezier
A/a    Draw a circular/elliptal arc
Z/z    Close path

Typically, uppercase directives specify absolute coordinates, and lowercase directives specify relative coordinates.

Related


How to draw curved SVG with single path?

Weber What I want is in the image below - I have 3 relative questions about this 1. We can use single path. Paint the entire canvas ? 2. If we can only use multiple paths to draw the whole, will it be convenient to animate them? 3. In both cases, who can kindl

How to draw curved SVG with single path?

Weber What I want is in the image below - I have 3 relative questions about this 1. We can use single path. Paint the entire canvas ? 2. If we can only use multiple paths to draw the whole, will it be convenient to animate them? 3. In both cases, who can kindl

How to draw curved SVG with single path?

Weber What I want is in the image below - I have 3 relative questions about this 1. We can use single path. Paint the entire canvas ? 2. If we can only use multiple paths to draw the whole, will it be convenient to animate them? 3. In both cases, who can kindl

How to draw curved SVG with single path?

Weber What I want is in the image below - I have 3 relative questions about this 1. We can use single path. Paint the entire canvas ? 2. If we can only use multiple paths to draw the whole, will it be convenient to animate them? 3. In both cases, who can kindl

How to draw curved SVG paths

Raphael How would I (if possible) draw a black border only along the inside of this svg. I've tried strokes and adding the stroke width, but this wraps the whole svg. Is there a way to stop the stroke at a specific point? div{ width: 300px; margin: 0 auto;

How to draw curved SVG paths

Raphael How would I (if possible) draw a black border only along the inside of this svg. I've tried strokes and adding the stroke width, but this wraps the whole svg. Is there a way to stop the stroke at a specific point? div{ width: 300px; margin: 0 auto;

How to draw curved SVG paths

Raphael How would I (if possible) draw a black border only along the inside of this svg. I've tried strokes and adding the stroke width, but this wraps the whole svg. Is there a way to stop the stroke at a specific point? div{ width: 300px; margin: 0 auto;

How to draw a single svg path with variable width stroke?

Abhishek Kandit How can I draw this shape with a single svg path? Sphinx You can do it with a single path, but there is currently no such thing as variable width stroke. Instead, a shape like this can be drawn using the fillintersecting path itself : #hide-str

svg draw circle with curved text

Love this life I need to draw a red coil with two curved strings like this: The upper string is always 3 characters long, the lower string can be 1 to 20 characters long UPDATE1: I tried using textpath and circle tag, but I think I need to change some coordina

svg draw circle with curved text

Love this life I need to draw a red coil with two curved strings like this: The upper string is always 3 characters long, the lower string can be 1 to 20 characters long UPDATE1: I tried using textpath and circle tag, but I think I need to change some coordina

svg draw circle with curved text

Love this life I need to draw a red coil with two curved strings like this: The upper string is always 3 characters long, the lower string can be 1 to 20 characters long UPDATE1: I tried using textpath and circle tag, but I think I need to change some coordina

How to draw curved shadows?

Ilutov like this: I know this doesn't work NSShadow, drawRect:plugging it in does the trick. David Rönnqvist You can use Core Animations layers and shadowPathproperties to do this and many other types of shadows . The shadow you describe can be generated by an

How to draw "curved" lines?

Daniel The problem is simple, as the title says. Tizen's documentation is really unreliable on this topic (among others). For example, as they describe here : Draw SVG paths. You can use the api in efl_gfx_utils.h to construct the path ... efl_gfx_path_append_

How to draw "curved" lines?

Daniel The problem is simple, as the title says. Tizen's documentation is really unreliable on this topic (among others). For example, as they describe here : Draw SVG paths. You can use the api in efl_gfx_utils.h to construct the path ... efl_gfx_path_append_

how to draw svg path animation

Trinanjan Saha I have 3 glowing blubs and 2 dotted lines connecting them. I have to pass the brilliance in a repeating fashion through the lines from one blub to the other (like each dash is glowing one after the other). So far I was able to achieve this. http

How to create a curved SVG path between two points?

WenukaGTX I need to draw a symmetrical curve between the centers of two circles . <svg> <circle class="spot" id="au" cx="1680" cy="700" r="0"></circle> <circle class="spot" id="sl" cx="1425" cy="525" r="0"></circle> <line id="line1" stroke-width="

How to create a curved SVG path between two points?

WenukaGTX I need to draw a symmetrical curve between the centers of two circles . <svg> <circle class="spot" id="au" cx="1680" cy="700" r="0"></circle> <circle class="spot" id="sl" cx="1425" cy="525" r="0"></circle> <line id="line1" stroke-width="

How to create a curved SVG path between two points?

WenukaGTX I need to draw a symmetrical curve between the centers of two circles . <svg> <circle class="spot" id="au" cx="1680" cy="700" r="0"></circle> <circle class="spot" id="sl" cx="1425" cy="525" r="0"></circle> <line id="line1" stroke-width="

How to draw a line with curved ends

Sheikh How can I draw the horizontal line shown in the image above (curved upwards from the left end) in the XML file through the selector? Below is my selector file code. thanks <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.andro

How to draw a line with curved ends

Sheikh How can I draw the horizontal line shown in the image above (curved upwards from the left end) in the XML file through the selector? Below is my selector file code. thanks <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.andro

How to draw curved arrows with CreateJS?

graphics problem The JavaScript code for drawing the curved arrow is already in this fiddle : http://jsfiddle.net/SguzM/ I want to do the same thing using CreateJS library. The fiddle code above is as follows: var can = document.getElementById('canvas1'); var

How to draw curved arrows with CreateJS?

graphics problem The JavaScript code for drawing the curved arrow is already in this fiddle : http://jsfiddle.net/SguzM/ I want to do the same thing using CreateJS library. The code from the fiddle above is as follows: var can = document.getElementById('canvas

How to draw a line with curved ends

Sheikh How can I draw the horizontal line shown in the image above (curved upwards from the left end) in the XML file through the selector? Below is my selector file code. thanks <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.andro

How to draw a line with curved ends

Sheikh How can I draw the horizontal line shown in the image above (curved upwards from the left end) in the XML file through the selector? Below is my selector file code. thanks <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.andro

How to draw curved arrows with CreateJS?

graphics problem The JavaScript code for drawing the curved arrow is already in this fiddle : http://jsfiddle.net/SguzM/ I want to do the same thing using CreateJS library. The code from the fiddle above is as follows: var can = document.getElementById('canvas

Draw a shape along a curved path in the canvas

living I've been doing some googling and can't find an answer (I think I'm asking the wrong question), but I'm wondering if it's possible to draw a set of objects along a path. For example, is it possible to use quadraticCurveTo() to draw a path and then draw

Draw curved border using clipping path in CSS

Hughesner Hi here I am trying to add a bubble in the bottom left corner, I have used a clipping path but the problem is that I cannot adjust the pixels properly to make it look sharp and accurate. Can anyone suggest me how to implement it and any other alterna

SwiftUI - draw (curved) path between views

Large chair In very basic terms, in my Android app I have a screen that draws circles and then connects them with curves. I'm trying to recreate it in SwiftUI. I found this question very similar to what I was looking for, but unfortunately the answer was very

Draw a shape along a curved path in the canvas

living I've been doing some googling and can't find an answer (I think I'm asking the wrong question), but I'm wondering if it's possible to draw a set of objects along a path. For example, is it possible to use quadraticCurveTo() to draw a path and then draw