tikz 中行走的人的形状

tikz 中行走的人的形状

TikZ 是否包含一些包含任意形状的人像的库?我需要类似的东西 在此处输入图片描述

SVG这里并尝试使用\usetikzlibrary{svg.path},但不幸的是它分为三个部分

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{svg.path}
\begin{document}
    \begin{tikzpicture}
    \begin{scope}[scale=0.1]
    \fill [rotate = 180] svg {m 449.16479,159.91688 -9.80709,-17.65276 -1.96142,-17.65276 -19.61419,0 -11.7685,-1.96142 -1.96142,-1.96142 c 0,0 -2.70196,-9.16652 -1.96142,-13.72993 0.46836,-2.88615 3.92284,-7.845672 3.92284,-7.845672 l 0,-5.884255 0,-11.76851 0,-7.845673 c 0,0 -10.49375,3.236176 -13.72993,0 -0.92462,-0.924622 0,-3.922837 0,-3.922837 0,-3.26903 0.21786,-8.729398 1.33072,-11.803174 1.73834,-4.801392 8.47637,-9.772427 8.47637,-9.772427 l 0,-15.691346 7.84567,-29.4212742 c 0,0 -8.59002,-2.27143635 -9.80709,-5.8842549 -2.24805,-6.6732241 3.22327,-14.3020189 7.84567,-19.6141829 6.9203,-7.952968 17.17439,-13.378491 27.45986,-15.691346 8.31691,-1.870192 17.02987,0.9857 25.49844,1.961418 8.54296,0.984289 17.26428,1.44297 25.49843,3.922837 8.9634,2.699494 18.26211,5.830045 25.49844,11.768509 6.87428,5.641351 12.21416,13.3908772 15.69135,21.5756015 4.41317,10.3878645 5.88425,33.3441105 5.88425,33.3441105 l -5.88425,21.575601 -11.76851,35.30553 -5.88426,25.498435 17.65277,19.61419 z
    m 447.20337,154.03263 -21.5756,25.49844 -1.96142,11.76851 5.88425,9.80709 c 0,0 -25.39772,50.81745 -29.42127,78.45673 -4.05976,27.88805 5.88426,84.34099 5.88426,84.34099 l -13.72993,11.76851 3.92283,5.88425 -45.11262,45.11262 -25.49843,19.61418 -13.72993,7.84568 -27.45986,3.92283 -25.49844,19.61419 -11.76851,5.88425 1.96142,7.84567 5.88426,0 -5.88426,1.96142 7.84568,11.76851 7.84567,0 1.96142,5.88426 11.76851,1.96142 5.88425,-7.84568 0,11.76851 7.84567,0 15.69135,-13.72993 21.5756,-17.65276 7.84568,-7.84567 68.64964,-41.18979 9.80709,121.60794 176.52764,23.53702 7.84568,-105.91659 3.92283,-60.80397 9.80709,-64.7268 7.84568,7.84567 11.76851,72.57248 -3.88426,58.84255 3.88426,17.65276 -7.84568,29.42128 1.96142,43.1512 13.72993,14.56245 3.92284,0 0,-22.40813 3.92283,21.57561 7.84568,0 3.92283,-25.49844 1.96142,19.61418 11.76851,-3.92284 -3.92284,-27.45985 7.84568,19.61418 7.84567,0 -9.80709,-56.88113 -7.84567,-25.49844 3.92283,-41.18978 0,-94.14808 c 0,0 7.49554,2.31155 9.80709,0 9.70852,-9.70852 0,-41.18978 0,-41.18978 0,0 -2.15341,-9.46272 -5.88425,-11.76851 -3.89312,-2.40608 -13.72993,0 -13.72993,0 l 0,-27.45986 -25.49844,-25.49844 c 0,0 5.34131,-12.79187 1.96142,-17.65276 -1.53893,-2.21326 -7.84567,-1.96142 -7.84567,-1.96142 0,0 -15.62399,-46.65472 -31.38269,-64.7268 -9.2957,-10.66032 -35.30553,-23.53702 -35.30553,-23.53702 l -35.30553,-11.76851 z
    m 415.22856,556.75408 -3.33072,36.63625 -21.5756,49.03545 -31.38269,88.26383 c 0,0 -11.33061,12.00267 -13.72993,19.61418 -2.35872,7.48272 0,23.53702 0,23.53702 l 1.96142,15.69134 -1.96142,11.76851 0,11.76851 -35.30553,149.06779 5.88425,49.03544 -5.88425,5.8843 -11.76851,-5.8843 -21.5756,25.4985 -41.18979,13.7299 -47.07403,-1.9614 -3.92284,5.8842 -3.92284,1.9614 -3.92283,13.73 c 0,0 51.33084,21.8111 78.45673,27.4598 17.32938,3.6087 52.95829,3.9229 52.95829,3.9229 l 0,9.8071 56.88113,5.8842 7.84567,-23.537 -3.92283,-1.9614 11.76851,-62.7654 -5.88426,-1.9614 15.69135,-31.38273 39.22836,-147.10637 0,-29.42127 c 0,0 12.95888,-14.51229 15.69135,-23.53702 1.70516,-5.63178 0,-17.65277 0,-17.65277 l -3.92284,-7.84567 50.99688,-72.57248 35.30553,103.95517 25.49844,37.26695 9.80709,25.49844 7.84567,9.80709 c 0,0 8.7818,42.92472 17.65277,62.76539 3.47948,7.78215 13.72992,21.5756 13.72992,21.5756 l 21.5756,41.18978 -3.92283,11.76849 7.84567,21.5756 -11.76851,19.6142 -31.38269,33.3441 -37.26695,1.9614 -9.80709,3.9229 0,5.8842 -3.92284,1.9614 0,5.8843 c 20.92258,4.016 36.48009,9.5649 84.34099,5.8843 l 33.34411,-13.73 11.76851,0 0,7.8457 64.7268,-15.6913 -15.69134,-54.9198 -11.76851,-45.11258 -9.80709,-13.72993 -17.65277,-58.84255 c 0,0 -15.94249,-59.8714 -31.38269,-86.3024 -3.04048,-5.20479 -11.76851,-13.72993 -11.76851,-13.72993 0,0 -4.60958,-19.24675 -9.80709,-27.45986 -2.4722,-3.90657 -9.80709,-9.80709 -9.80709,-9.80709 0,0 -1.10661,-13.57059 -3.92284,-19.61418 -1.76825,-3.79463 -7.84567,-9.80709 -7.84567,-9.80709 l -3.92284,-31.38269 -3.92284,-19.61419 -7.84567,-70.61106 0,-15.69134 9.80709,-33.20546 z
    };
    \end{scope}
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

修复方法确实很简单:

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{svg.path}
\begin{document}
    \begin{tikzpicture}
    \begin{scope}[scale=0.1]
    \fill [rotate = 180] svg {M 151.61133 -0.0625 C 150.4029 -0.073901277 149.20348 0.024346332 148.01758 0.29101562 C 142.15119 1.6101688 136.30251 4.7042031 132.35547 9.2402344 C 129.71905 12.270065 126.59867 16.621614 127.88086 20.427734 C 128.57502 22.488331 133.47461 23.783203 133.47461 23.783203 L 129 40.564453 L 129 49.513672 C 129 49.513672 125.15749 52.349383 124.16602 55.087891 C 123.53129 56.84104 123.40625 59.955798 123.40625 61.820312 C 123.40625 61.820312 122.87889 63.529276 123.40625 64.056641 C 125.25203 65.902416 131.23633 64.056641 131.23633 64.056641 L 131.23633 68.533203 L 131.23633 75.244141 L 131.23633 78.601562 C 131.23633 78.601562 129.26713 81.430036 129 83.076172 C 128.57763 85.678945 130.11914 90.90625 130.11914 90.90625 L 131.23633 92.025391 L 137.94922 93.144531 L 149.13672 93.144531 L 150.25586 103.21289 L 154.2793 110.45703 L 142.42383 124.4668 L 141.30469 131.17969 L 144.66211 136.77344 C 144.66211 136.77344 130.17572 165.75723 127.88086 181.52148 C 125.56535 197.42763 131.23633 229.62695 131.23633 229.62695 L 123.40625 236.33789 L 125.64258 239.69531 L 99.914062 265.42578 L 85.369141 276.61133 L 77.539062 281.08789 L 61.876953 283.32422 L 47.333984 294.51172 L 40.621094 297.86719 L 41.740234 302.3418 L 45.095703 302.3418 L 41.740234 303.46094 L 46.214844 310.17383 L 50.689453 310.17383 L 51.808594 313.5293 L 58.521484 314.64844 L 61.876953 310.17383 L 61.876953 316.88477 L 66.351562 316.88477 L 75.300781 309.05469 L 87.607422 298.98633 L 92.082031 294.51172 L 131.23633 271.01953 L 136.77148 339.65625 L 136.49219 339.61914 L 134.59375 360.51562 L 122.28711 388.48242 L 104.38867 438.82422 C 104.38867 438.82422 97.92511 445.67044 96.556641 450.01172 C 95.211328 454.27954 96.556641 463.43555 96.556641 463.43555 L 97.675781 472.38672 L 96.556641 479.09766 L 96.556641 485.81055 L 76.419922 570.83203 L 79.777344 598.80078 L 76.419922 602.15625 L 69.708984 598.80078 L 57.402344 613.34375 L 33.910156 621.17383 L 7.0605469 620.05664 L 4.8222656 623.41211 L 2.5859375 624.53125 L 0.34765625 632.36133 C 0.34765625 632.36133 29.624261 644.80166 45.095703 648.02344 C 54.979637 650.08168 75.300781 650.26172 75.300781 650.26172 L 75.300781 655.85352 L 107.74414 659.21094 L 112.21875 645.78516 L 109.98242 644.66797 L 116.69336 608.86914 L 113.33789 607.75 L 122.28711 589.84961 L 144.66211 505.94727 L 144.66211 489.16602 C 144.66211 489.16602 152.05284 480.88951 153.61133 475.74219 C 154.58388 472.53006 153.61133 465.67383 153.61133 465.67383 L 151.37305 461.19922 L 180.46094 419.80664 L 200.59766 479.09766 L 215.14062 500.35352 L 220.73438 514.89648 L 225.20898 520.49023 C 225.20898 520.49023 230.21772 544.9728 235.27734 556.28906 C 237.26189 560.72767 243.10742 568.5957 243.10742 568.5957 L 255.41406 592.08789 L 253.17578 598.80078 L 257.65039 611.10547 L 250.93945 622.29297 L 233.03906 641.31055 L 211.7832 642.42969 L 206.19141 644.66797 L 206.19141 648.02344 L 203.95312 649.14258 L 203.95312 652.49805 C 215.88647 654.7886 224.75884 657.95277 252.05664 655.85352 L 271.07617 648.02344 L 277.78711 648.02344 L 277.78711 652.49805 L 314.70508 643.54883 L 305.75586 612.22461 L 299.04297 586.49414 L 293.44922 578.66406 L 283.38086 545.10156 C 283.38086 545.10156 274.28885 510.95401 265.48242 495.87891 C 263.74826 492.91032 258.76953 488.04883 258.76953 488.04883 C 258.76953 488.04883 256.14022 477.07112 253.17578 472.38672 C 251.76574 470.15858 247.58203 466.79297 247.58203 466.79297 C 247.58203 466.79297 246.95196 459.05247 245.3457 455.60547 C 244.33717 453.44117 240.87109 450.01172 240.87109 450.01172 L 238.63281 432.11328 L 236.39648 420.92578 L 231.91992 380.65234 L 231.91992 371.70312 L 237.21875 353.76367 L 237.51367 353.80273 L 241.98828 293.39258 L 244.22656 258.71289 L 249.82031 221.79492 L 254.29492 226.26953 L 261.00781 267.66211 L 258.79102 301.22461 L 261.00781 311.29297 L 256.5332 328.07227 L 257.65039 352.68359 L 265.48242 360.99023 L 267.71875 360.99023 L 267.71875 348.20898 L 269.95703 360.51562 L 274.43164 360.51562 L 276.66992 345.97266 L 277.78711 357.1582 L 284.5 354.92188 L 282.26367 339.25977 L 286.73828 350.44727 L 291.21289 350.44727 L 285.61914 318.00391 L 281.14453 303.46094 L 283.38086 279.96875 L 283.38086 226.26953 C 283.38086 226.26953 287.6562 227.58794 288.97461 226.26953 C 294.51193 220.73221 288.97461 202.77734 288.97461 202.77734 C 288.97461 202.77734 287.74705 197.37958 285.61914 196.06445 C 283.39867 194.69213 277.78711 196.06445 277.78711 196.06445 L 277.78711 180.40234 L 263.24414 165.85938 C 263.24414 165.85938 266.29103 158.56346 264.36328 155.79102 C 263.48554 154.52867 259.88867 154.67383 259.88867 154.67383 C 259.88867 154.67383 250.97637 128.0634 241.98828 117.75586 C 236.68641 111.67567 221.85156 104.33008 221.85156 104.33008 L 201.71484 97.619141 L 199.18164 98.283203 L 190.5293 88.669922 L 193.88477 74.125 L 200.59766 53.988281 L 203.95312 41.683594 C 203.95313 41.683594 203.11474 28.590807 200.59766 22.666016 C 198.61442 17.997801 195.56728 13.576959 191.64648 10.359375 C 187.51919 6.9723303 182.21585 5.1861598 177.10352 3.6464844 C 172.40711 2.2320748 167.43308 1.9715524 162.56055 1.4101562 C 158.93797 0.99277553 155.23662 -0.02829617 151.61133 -0.0625 z 
    };
    \end{scope}
    \end{tikzpicture}
\end{document}

我所做的就是:

  • 在 Inkscape 中打开下载的 SVG
  • 进入(唯一)组
  • 全选
  • 路径|联合
  • 重新保存
  • 在文本编辑器中打开
  • 将路径复制粘贴到示例中的 svg 命令中

该库似乎难以处理多条路径,这种方法比手动修改代码更容易

相关内容