当前位置:网站首页>Svg series - 3, powerful path
Svg series - 3, powerful path
2022-04-22 22:22:00 【_ Shredded pork noodles with sauerkraut_】
List of articles
Easy to use
d: Path process .
stroke-width: Line width .
stroke: line color .
Path process :
M 0 0: Move to 0,0
L 100 100: Draw a line to 100,100
<path d="M 0 0 L 100 100" stroke-width="2" stroke="red"/>
effect :

Straight path
Move brush
M x y: Move to coordinates .
m dx dy: Move a distance .
Draw a straight line
L x y: Draw lines to coordinates .
l dx dy: Draw a line a distance .
H x: Level to x coordinate .
h dx: Level dx distance .
V y: Vertical line to y coordinate .
v dy: A vertical bar dy distance .
Closed path
Z
z
Will draw a line to the beginning of the path .
Case study : Five-pointed star
A few points of the pentagram :
50 0
98 35
79 91
21 91
2 35
Then drawing a five pointed star is :
135241
<path d=" M 50 0 L 79 91 L 2 35 L 98 35 L 21 91 Z " fill="red"/>
effect :

Curve path
Twice Bessel
A control point , One point .
Q x1 y1, x y
q dx1 dy1, dx dy
Reuse the previous control point .
T x y (or t dx dy)
Three times Bessel
Two control points , One point .
C x1 y1, x2 y2, x y
c dx1 dy1, dx2 dy2, dx dy
Reuse the previous control point .
S x2 y2, x y
s dx2 dy2, dx dy
arc
A
rx ry
x-axis-rotation
large-arc-flag
sweep-flag
x y
a
rx ry
x-axis-rotation
large-arc-flag
sweep-flag
dx dy
rx ry: Two radii .
x-axis-rotation: Rotation Angle .
large-arc-flag:0 The one with a small angle ,1 The one with a large angle .
sweep-flag:0 Anti-clockwise ,1 Clockwise .
x y,dx dy: End coordinates .
Case study : arc
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600" >
<path d="M80 80 a 45 45, 0, 0, 0, 45 45 Z" fill="red"/>
<path d="M230 80 a 45 45, 0, 1, 0, 45 45 Z" fill="red"/>
<path d="M80 230 a 45 45, 0, 0, 1, 45 45 Z" fill="red"/>
<path d="M230 230 a 45 45, 0, 1, 1, 45 45 Z" fill="red"/>
</svg>
effect :
The small one used for both on the left . The big one on the right .
Both of them go counterclockwise . Lower clockwise .
How to understand ?
A line from the beginning to the end , To card a circle with a specified radius .
The size of the block determines whether to use a large part or a small part .
Clockwise or counterclockwise determines whether the center of the circle is on the left or right .

版权声明
本文为[_ Shredded pork noodles with sauerkraut_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221452380667.html
边栏推荐
- 工业互联网创新迭代的推手
- [Luogu] p1464 function * (memory search)
- Live app source code, with the page scrolling up and down, automatic ceiling
- bluetoothGatt. Disconnect() is invalid, or is it still connected
- TS classic type gymnastics: how to turn the joint type into the cross type? We need to know three points: distribution law, inversion position, inversion and covariance
- How to improve the team's more efficient collaboration ability through cloud projex project collaboration
- Short video platform development, customize a pop-up style and content
- 【acwing】1135. Happy new year to jtra + * * *
- 优麒麟 22.04 LTS 版本正式发布 | UKUI 3.1开启全新体验!
- 万物互联时代,小米、苹果、华为等智能家居生态该如何挑选?
猜你喜欢

Remote desktop failure resolution

The use of servlets corresponds to the nine built-in objects

智能家居的完全形态以及“小 HomeKit”的发展

Why is bi so important to enterprises?

ToolJet 是什么,怎么样? —— 低代码开发平台测评

从构建到治理,业内首本微服务治理技术白皮书正式发布(含免费下载链接)

集简云 x ServiceGo:助力硬件制造商实现设备报修、维修智能化管理

SAP ui5 application development tutorial 71 - nested routing trial version of SAP ui5 page

秒云助力中电科32所发布“基于拟态应用集成框架的SaaS云管理平台解决方案”

CrashSight 接入上报常见问题及解决方案
随机推荐
优化点
Sending non-protected broadcast
[Luogu] p1036 [NOIP2002 popularization group] selection number (DFS)
Referrer Policy示例讲解
JD side: how can a child thread get the value of the parent thread ThreadLocal? I got...
Yapi本地部署
TS classic type gymnastics: how to turn the joint type into the cross type? We need to know three points: distribution law, inversion position, inversion and covariance
Lightly:新一代的 Cloud IDE
COMP1011编程解答
Function pointer and callback function
Learn JVM performance optimization
KunlunDB对MySQL私有DML语法的支持
Rpcx source code learning - client side
系列解读 SMC-R (二):融合 TCP 与 RDMA 的 SMC-R 通信 | 龙蜥技术
头部固定吸顶,不足一屏footer固定底部,超过一屏滚动,注意看注释
Pushing hand of industrial Internet innovation iteration
人称小HomeKit的智汀,如何连接天猫精灵音箱?
The use of servlets corresponds to the nine built-in objects
Leetcode -- parity tree
从构建到治理,业内首本微服务治理技术白皮书正式发布(含免费下载链接)