我是靠谱客的博主 缥缈钥匙,这篇文章主要介绍演示tikz中文字沿路径摆放,现在分享给大家,希望可以做个参考。

演示tikz中文字沿路径摆放:

复制代码
1
2
3
4
5
6
%演示文字沿路径摆放 begin{tikzpicture} path decorate [decoration={text along path, text={some text along a path}}]{ (0,2) .. controls (2,2) and (1,0) .. (3,0) }; draw (0,2) .. controls (2,2) and (1,0) .. (3,0); end{tikzpicture}

效果如下:

但是tikz没有封装命令decorate,但是下面的用法是可以的:

复制代码
1
tikz draw decorate[decoration=zigzag] {(0,0) -- (3,0)};
对于decoration的定义示例如下:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pgfdeclaredecoration{stars}{initial}{ state{initial}[width=15pt] { pgfmathparse{round(rnd*100)} pgfsetfillcolor{yellow!pgfmathresult!orange} pgfsetstrokecolor{yellow!pgfmathresult!red} pgfnode{star}{center}{}{}{pgfusepath{stroke,fill}} } state{final} { pgfpathmoveto{pgfpointdecoratedpathlast} } } tikzpath[decorate, decoration=stars, star point ratio=2, star points=5, inner sep=0, minimum size=rnd*10pt+2pt] (0,0) .. controls (0,2) and (3,2) .. (3,0) .. controls (3,-3) and (0,0) .. (0,-3) .. controls (0,-5) and (3,-5) .. (3,-3);
效果如下:


最后

以上就是缥缈钥匙最近收集整理的关于演示tikz中文字沿路径摆放的全部内容,更多相关演示tikz中文字沿路径摆放内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部