答案1
本网站不喜欢“只为我做”的问题,因此请确保在下一个问题中添加 MWE!(无论如何,您不再是新用户了。)
我回答了一个 JDIFM 问题,因为我实际上并没有为此付出任何努力。我只是去 Inkscape 教授家里问他,他很快就给了我他的代码:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
\fill[yellow,yshift=7.2cm] (15,30) rectangle (40,15);
\path[fill=black,line width=0.056pt] (11.7614,296.5612) .. controls
(11.3851,295.9868) and (11.4156,295.6960) .. (12.1522,292.8392) .. controls
(12.5917,291.1347) and (12.9512,289.5263) .. (12.9512,289.2649) .. controls
(12.9512,289.0035) and (12.4849,288.4664) .. (11.9150,288.0715) .. controls
(10.8120,287.3071) and (8.0433,284.4949) .. (7.3902,283.4755) .. controls
(7.1101,283.0385) and (6.6579,282.8200) .. (5.8075,282.7111) .. controls
(2.4694,282.2834) and (0.6994,279.9432) .. (-0.0230,275.0021) .. controls
(-0.3005,273.1045) and (-0.2866,272.7630) .. (0.0919,272.1854) .. controls
(0.3287,271.8239) and (0.7889,271.4769) .. (1.1145,271.4143) .. controls
(3.8064,270.8964) and (4.9406,270.6343) .. (5.2960,270.4477) .. controls
(5.5240,270.3280) and (6.1422,269.3594) .. (6.6698,268.2952) .. controls
(7.6356,266.3469) and (9.2936,264.3698) .. (11.2099,262.8815) --
(12.2466,262.0763) -- (11.5545,261.1688) .. controls (10.7799,260.1533) and
(9.3930,257.2403) .. (9.1277,256.0717) -- (8.9543,255.3080) --
(11.5481,255.4387) .. controls (14.4665,255.5857) and (18.0645,256.6356) ..
(20.6242,258.0870) .. controls (21.4245,258.5408) and (22.3934,258.8904) ..
(22.7772,258.8640) .. controls (23.3875,258.8219) and (23.4979,258.9405) ..
(23.6580,259.8100) .. controls (24.1689,262.5854) and (26.2258,265.1720) ..
(28.8628,266.3555) .. controls (30.7667,267.2099) and (33.5066,267.3323) ..
(35.4030,266.6477) .. controls (37.0986,266.0356) and (38.9808,264.5459) ..
(39.9326,263.0626) -- (40.7698,261.7580) -- (42.1396,262.6008) .. controls
(44.0447,263.7731) and (47.0598,266.7080) .. (48.0085,268.3137) .. controls
(48.4853,269.1206) and (48.9906,269.6592) .. (49.2738,269.6624) .. controls
(49.9018,269.6694) and (51.5831,268.9567) .. (51.5702,268.6889) .. controls
(51.5642,268.5724) and (51.1821,268.2389) .. (50.7202,267.9478) .. controls
(49.4649,267.1569) and (48.6700,265.8172) .. (48.6700,264.4926) .. controls
(48.6700,263.5579) and (48.8094,263.2473) .. (49.4840,262.6797) .. controls
(49.9318,262.3030) and (50.5925,261.9947) .. (50.9524,261.9947) .. controls
(52.5243,261.9947) and (54.2980,263.6473) .. (54.8197,265.5981) .. controls
(54.9902,266.2356) and (55.2833,266.7572) .. (55.4710,266.7572) .. controls
(55.6587,266.7572) and (56.2840,266.3310) .. (56.8607,265.8100) .. controls
(57.9885,264.7911) and (58.8201,264.7508) .. (59.1215,265.7003) .. controls
(59.4670,266.7891) and (57.3965,268.5769) .. (55.2846,269.0134) .. controls
(54.7753,269.1186) and (53.9204,269.5987) .. (53.3849,270.0802) .. controls
(52.8495,270.5616) and (51.8046,271.1711) .. (51.0630,271.4345) .. controls
(49.7563,271.8986) and (49.7210,271.9379) .. (49.9199,272.7087) .. controls
(50.0328,273.1462) and (50.1222,274.5756) .. (50.1185,275.8853) .. controls
(50.1078,279.6723) and (48.7426,282.8163) .. (45.7530,285.9395) .. controls
(45.0608,286.6627) and (44.6869,287.3330) .. (44.5724,288.0562) .. controls
(44.0349,291.4502) and (42.7403,296.0276) .. (42.1217,296.7213) .. controls
(41.7648,297.1215) and (41.1947,297.1843) .. (37.9195,297.1843) .. controls
(34.2202,297.1843) and (34.1203,297.1693) .. (33.7174,296.5545) .. controls
(33.3396,295.9779) and (33.3494,295.7635) .. (33.8333,294.0175) --
(34.3617,292.1104) -- (32.9831,292.3322) .. controls (31.3480,292.5953) and
(24.0735,292.6290) .. (22.7206,292.3798) -- (21.7743,292.2054) --
(21.1790,294.2318) .. controls (20.2900,297.2577) and (20.4197,297.1843) ..
(15.9591,297.1843) .. controls (12.2713,297.1843) and (12.1588,297.1676) ..
(11.7614,296.5612) -- cycle(36.7032,282.1261) .. controls (37.1792,281.9373)
and (37.6852,281.5650) .. (37.8277,281.2989) .. controls (37.9701,281.0327)
and (38.0867,279.2800) .. (38.0867,277.4041) .. controls (38.0867,274.0791)
and (38.0695,273.9771) .. (37.4036,273.3518) -- (36.7206,272.7103) --
(26.8422,272.7103) .. controls (21.4091,272.7103) and (16.8699,272.8043) ..
(16.7551,272.9192) .. controls (16.4775,273.1969) and (16.2807,279.3879) ..
(16.5024,280.8666) -- (16.6772,282.0322) -- (18.3200,282.3054) .. controls
(20.7458,282.7089) and (35.5994,282.5640) .. (36.7032,282.1262) --
cycle(15.5779,269.7642) .. controls (16.2980,268.8487) and (16.2702,268.2000)
.. (15.4768,267.4066) .. controls (14.2164,266.1462) and (12.4221,266.9216) ..
(12.4221,268.7266) .. controls (12.4221,270.4142) and (14.5232,271.1050) ..
(15.5779,269.7642) -- cycle(52.9033,266.3564) .. controls (52.9033,265.8422)
and (51.1535,263.9210) .. (50.9083,264.1661) .. controls (50.5218,264.5526)
and (51.0994,265.7360) .. (51.9182,266.2353) .. controls (52.9422,266.8596)
and (52.9033,266.8548) .. (52.9033,266.3564) -- cycle(30.1883,265.2075) ..
controls (28.4468,264.5878) and (27.6205,263.9904) .. (26.5183,262.5543) ..
controls (25.4449,261.1557) and (25.0385,259.6658) .. (25.1760,257.6333) ..
controls (25.3040,255.7406) and (25.9513,254.2863) .. (27.2387,252.9989) ..
controls (28.7839,251.4537) and (29.9551,251.0145) .. (32.5304,251.0145) ..
controls (34.4908,251.0145) and (34.9321,251.1048) .. (35.9700,251.7185) ..
controls (38.5102,253.2205) and (39.7803,255.4241) .. (39.7581,258.2905) ..
controls (39.7418,260.3841) and (39.2619,261.5926) .. (37.8302,263.1459) ..
controls (35.7943,265.3546) and (32.8406,266.1515) .. (30.1883,265.2075) --
cycle(33.1852,263.1830) .. controls (33.3344,262.8932) and (33.7790,262.3390)
.. (34.1733,261.9513) .. controls (35.7409,260.4100) and (35.3328,258.8215) ..
(33.0882,257.7276) .. controls (31.3987,256.9043) and (31.0221,256.3971) ..
(31.6408,255.7784) .. controls (32.1808,255.2384) and (33.3015,255.4480) ..
(33.8194,256.1859) .. controls (34.2616,256.8158) and (35.0590,256.8610) ..
(35.2862,256.2689) .. controls (35.4987,255.7152) and (34.8047,254.6469) ..
(33.9920,254.2766) .. controls (33.6471,254.1194) and (33.2920,253.7004) ..
(33.2029,253.3454) .. controls (32.9895,252.4954) and (31.9091,252.5842) ..
(31.7844,253.4619) .. controls (31.7379,253.7893) and (31.5837,254.0572) ..
(31.4416,254.0572) .. controls (31.2996,254.0572) and (30.8912,254.3495) ..
(30.5340,254.7067) .. controls (30.0660,255.1747) and (29.8846,255.6450) ..
(29.8846,256.3904) .. controls (29.8846,257.6560) and (30.7129,258.5878) ..
(32.2464,259.0472) .. controls (33.4580,259.4102) and (33.6899,259.6716) ..
(33.4557,260.4096) .. controls (33.2215,261.1474) and (31.6073,261.1457) ..
(31.1461,260.4076) .. controls (30.6598,259.6289) and (29.6200,259.7030) ..
(29.6200,260.5164) .. controls (29.6200,261.1223) and (30.9273,262.5243) ..
(31.4924,262.5243) .. controls (31.6267,262.5243) and (31.7367,262.7425) ..
(31.7367,263.0093) .. controls (31.7367,263.9995) and (32.7051,264.1159) ..
(33.1852,263.1834) -- cycle;
\end{tikzpicture}
\end{document}
还不错吧?
编辑
如果你想要一个宏
\documentclass{article}
\usepackage{tikz}
\def\pig[#1]{%
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt,#1]
\fill[yellow] (15,285) rectangle (40,270);
\path[fill=black,line width=0.056pt] (11.7614,296.5612) .. controls
(11.3851,295.9868) and (11.4156,295.6960) .. (12.1522,292.8392) .. controls
(12.5917,291.1347) and (12.9512,289.5263) .. (12.9512,289.2649) .. controls
(12.9512,289.0035) and (12.4849,288.4664) .. (11.9150,288.0715) .. controls
(10.8120,287.3071) and (8.0433,284.4949) .. (7.3902,283.4755) .. controls
(7.1101,283.0385) and (6.6579,282.8200) .. (5.8075,282.7111) .. controls
(2.4694,282.2834) and (0.6994,279.9432) .. (-0.0230,275.0021) .. controls
(-0.3005,273.1045) and (-0.2866,272.7630) .. (0.0919,272.1854) .. controls
(0.3287,271.8239) and (0.7889,271.4769) .. (1.1145,271.4143) .. controls
(3.8064,270.8964) and (4.9406,270.6343) .. (5.2960,270.4477) .. controls
(5.5240,270.3280) and (6.1422,269.3594) .. (6.6698,268.2952) .. controls
(7.6356,266.3469) and (9.2936,264.3698) .. (11.2099,262.8815) --
(12.2466,262.0763) -- (11.5545,261.1688) .. controls (10.7799,260.1533) and
(9.3930,257.2403) .. (9.1277,256.0717) -- (8.9543,255.3080) --
(11.5481,255.4387) .. controls (14.4665,255.5857) and (18.0645,256.6356) ..
(20.6242,258.0870) .. controls (21.4245,258.5408) and (22.3934,258.8904) ..
(22.7772,258.8640) .. controls (23.3875,258.8219) and (23.4979,258.9405) ..
(23.6580,259.8100) .. controls (24.1689,262.5854) and (26.2258,265.1720) ..
(28.8628,266.3555) .. controls (30.7667,267.2099) and (33.5066,267.3323) ..
(35.4030,266.6477) .. controls (37.0986,266.0356) and (38.9808,264.5459) ..
(39.9326,263.0626) -- (40.7698,261.7580) -- (42.1396,262.6008) .. controls
(44.0447,263.7731) and (47.0598,266.7080) .. (48.0085,268.3137) .. controls
(48.4853,269.1206) and (48.9906,269.6592) .. (49.2738,269.6624) .. controls
(49.9018,269.6694) and (51.5831,268.9567) .. (51.5702,268.6889) .. controls
(51.5642,268.5724) and (51.1821,268.2389) .. (50.7202,267.9478) .. controls
(49.4649,267.1569) and (48.6700,265.8172) .. (48.6700,264.4926) .. controls
(48.6700,263.5579) and (48.8094,263.2473) .. (49.4840,262.6797) .. controls
(49.9318,262.3030) and (50.5925,261.9947) .. (50.9524,261.9947) .. controls
(52.5243,261.9947) and (54.2980,263.6473) .. (54.8197,265.5981) .. controls
(54.9902,266.2356) and (55.2833,266.7572) .. (55.4710,266.7572) .. controls
(55.6587,266.7572) and (56.2840,266.3310) .. (56.8607,265.8100) .. controls
(57.9885,264.7911) and (58.8201,264.7508) .. (59.1215,265.7003) .. controls
(59.4670,266.7891) and (57.3965,268.5769) .. (55.2846,269.0134) .. controls
(54.7753,269.1186) and (53.9204,269.5987) .. (53.3849,270.0802) .. controls
(52.8495,270.5616) and (51.8046,271.1711) .. (51.0630,271.4345) .. controls
(49.7563,271.8986) and (49.7210,271.9379) .. (49.9199,272.7087) .. controls
(50.0328,273.1462) and (50.1222,274.5756) .. (50.1185,275.8853) .. controls
(50.1078,279.6723) and (48.7426,282.8163) .. (45.7530,285.9395) .. controls
(45.0608,286.6627) and (44.6869,287.3330) .. (44.5724,288.0562) .. controls
(44.0349,291.4502) and (42.7403,296.0276) .. (42.1217,296.7213) .. controls
(41.7648,297.1215) and (41.1947,297.1843) .. (37.9195,297.1843) .. controls
(34.2202,297.1843) and (34.1203,297.1693) .. (33.7174,296.5545) .. controls
(33.3396,295.9779) and (33.3494,295.7635) .. (33.8333,294.0175) --
(34.3617,292.1104) -- (32.9831,292.3322) .. controls (31.3480,292.5953) and
(24.0735,292.6290) .. (22.7206,292.3798) -- (21.7743,292.2054) --
(21.1790,294.2318) .. controls (20.2900,297.2577) and (20.4197,297.1843) ..
(15.9591,297.1843) .. controls (12.2713,297.1843) and (12.1588,297.1676) ..
(11.7614,296.5612) -- cycle(36.7032,282.1261) .. controls (37.1792,281.9373)
and (37.6852,281.5650) .. (37.8277,281.2989) .. controls (37.9701,281.0327)
and (38.0867,279.2800) .. (38.0867,277.4041) .. controls (38.0867,274.0791)
and (38.0695,273.9771) .. (37.4036,273.3518) -- (36.7206,272.7103) --
(26.8422,272.7103) .. controls (21.4091,272.7103) and (16.8699,272.8043) ..
(16.7551,272.9192) .. controls (16.4775,273.1969) and (16.2807,279.3879) ..
(16.5024,280.8666) -- (16.6772,282.0322) -- (18.3200,282.3054) .. controls
(20.7458,282.7089) and (35.5994,282.5640) .. (36.7032,282.1262) --
cycle(15.5779,269.7642) .. controls (16.2980,268.8487) and (16.2702,268.2000)
.. (15.4768,267.4066) .. controls (14.2164,266.1462) and (12.4221,266.9216) ..
(12.4221,268.7266) .. controls (12.4221,270.4142) and (14.5232,271.1050) ..
(15.5779,269.7642) -- cycle(52.9033,266.3564) .. controls (52.9033,265.8422)
and (51.1535,263.9210) .. (50.9083,264.1661) .. controls (50.5218,264.5526)
and (51.0994,265.7360) .. (51.9182,266.2353) .. controls (52.9422,266.8596)
and (52.9033,266.8548) .. (52.9033,266.3564) -- cycle(30.1883,265.2075) ..
controls (28.4468,264.5878) and (27.6205,263.9904) .. (26.5183,262.5543) ..
controls (25.4449,261.1557) and (25.0385,259.6658) .. (25.1760,257.6333) ..
controls (25.3040,255.7406) and (25.9513,254.2863) .. (27.2387,252.9989) ..
controls (28.7839,251.4537) and (29.9551,251.0145) .. (32.5304,251.0145) ..
controls (34.4908,251.0145) and (34.9321,251.1048) .. (35.9700,251.7185) ..
controls (38.5102,253.2205) and (39.7803,255.4241) .. (39.7581,258.2905) ..
controls (39.7418,260.3841) and (39.2619,261.5926) .. (37.8302,263.1459) ..
controls (35.7943,265.3546) and (32.8406,266.1515) .. (30.1883,265.2075) --
cycle(33.1852,263.1830) .. controls (33.3344,262.8932) and (33.7790,262.3390)
.. (34.1733,261.9513) .. controls (35.7409,260.4100) and (35.3328,258.8215) ..
(33.0882,257.7276) .. controls (31.3987,256.9043) and (31.0221,256.3971) ..
(31.6408,255.7784) .. controls (32.1808,255.2384) and (33.3015,255.4480) ..
(33.8194,256.1859) .. controls (34.2616,256.8158) and (35.0590,256.8610) ..
(35.2862,256.2689) .. controls (35.4987,255.7152) and (34.8047,254.6469) ..
(33.9920,254.2766) .. controls (33.6471,254.1194) and (33.2920,253.7004) ..
(33.2029,253.3454) .. controls (32.9895,252.4954) and (31.9091,252.5842) ..
(31.7844,253.4619) .. controls (31.7379,253.7893) and (31.5837,254.0572) ..
(31.4416,254.0572) .. controls (31.2996,254.0572) and (30.8912,254.3495) ..
(30.5340,254.7067) .. controls (30.0660,255.1747) and (29.8846,255.6450) ..
(29.8846,256.3904) .. controls (29.8846,257.6560) and (30.7129,258.5878) ..
(32.2464,259.0472) .. controls (33.4580,259.4102) and (33.6899,259.6716) ..
(33.4557,260.4096) .. controls (33.2215,261.1474) and (31.6073,261.1457) ..
(31.1461,260.4076) .. controls (30.6598,259.6289) and (29.6200,259.7030) ..
(29.6200,260.5164) .. controls (29.6200,261.1223) and (30.9273,262.5243) ..
(31.4924,262.5243) .. controls (31.6267,262.5243) and (31.7367,262.7425) ..
(31.7367,263.0093) .. controls (31.7367,263.9995) and (32.7051,264.1159) ..
(33.1852,263.1834) -- cycle;
\end{tikzpicture}
}
\begin{document}
\pig[scale=2] \pig[scale=0.5]
\end{document}