将SVG数据转换为图像

时间:2018-07-27 04:43:52

标签: c# svg

我有一些这样的svg数据:

"data":"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"150\" height=\"50\"><path d=\"M13 20 C76 10,89 3,137 12\" stroke=\"#777\" fill=\"none\"/><path d=\"M16 10 C55 22,87 7,131 29\" stroke=\"#222\" fill=\"none\"/><path fill=\"#222\" d=\"M109.72 49.63Q112.61 45.75 115.51 39.54Q112.39 32.99 106.29 24.92Q108.20 26.07 110.98 26.71Q114.52 31.40 116.95 36.61Q119.12 31.32 122.21 26.90Q124.41 26.56 126.51 25.76Q123.08 29.57 119.62 36.99L116.80 43.01Q115.35 46.13 113.60 48.76Q111.17 49.10 109.72 49.63M115.89 50.96Q117.60 48.07 119.05 44.80L121.79 38.48Q125.29 30.44 128.60 26.45Q127.27 27.13 125.37 27.82L126.39 26.41Q126.93 25.69 127.54 25Q124.87 26.07 122.02 26.52Q119.28 30.44 117.33 34.90Q115.70 31.59 113.91 28.77Q113.72 28.77 113.36 28.73Q112.99 28.69 112.80 28.69Q112.04 27.44 111.09 26.29Q107.93 25.65 105.19 23.93Q111.43 31.93 115.13 39.54Q112.96 44.61 108.88 50.24Q109.72 49.97 110.52 49.82L112.12 49.44Q111.51 50.16 110.33 51.80Q112.61 51.19 115.89 50.96Z\"/><path d=\"M8 27 C95 34,66 29,147 7\" stroke=\"#555\" fill=\"none\"/><path fill=\"#111\" d=\"M57.87 40.19Q56.00 40.11 54.33 40.68Q54.86 37.07 54.97 33.95Q55.09 30.90 54.86 27.25Q53.45 26.87 52.69 26.48L52.31 23.48Q53.07 24.12 54.67 24.70Q54.44 22.56 54.02 19.82Q56.31 20.51 57.94 20.36L57.83 24.96Q59.24 24.89 60.57 24.39Q60.53 25.30 60.30 27.06Q58.78 27.40 57.75 27.40Q57.75 29.57 57.75 33.83Q57.79 38.02 57.87 40.19M60.99 23.82Q60.72 23.93 60.11 24.16L60.49 21.38Q59.69 21.69 58.29 21.92Q58.29 21.23 58.44 19.86Q57.83 19.94 57.26 19.94Q55.13 19.94 53.49 19.21Q53.98 21.69 54.25 24.16Q53.38 23.82 51.85 22.79Q52.20 24.09 52.42 26.79Q52.88 27.02 54.06 27.44Q54.10 28.08 54.14 29.49L54.52 29.53L54.63 29.57Q54.67 30.79 54.67 31.97Q54.67 36.92 53.87 41.26Q54.06 41.14 56.00 40.61Q56.04 41.29 55.93 42.66Q56.73 42.59 57.52 42.59Q59.24 42.59 60.88 43.16Q59.54 37.45 59.73 29.53L62.13 29.15Q62.21 28.24 62.28 27.21L62.47 25.19Q61.90 25.46 60.72 25.91Q61.03 24.58 60.95 24.24Q60.91 24.01 60.99 23.82Z\"/><path fill=\"#222\" d=\"M96.05 34.71Q96.05 38.29 92.89 39.58Q90.99 40.38 86.57 40.53Q81.78 40.65 79.53 39.47Q77.70 38.17 77.86 34.82Q77.89 34.21 78.08 32.23Q78.20 30.63 78.20 29.64Q78.20 21.65 74.01 14.23Q75.15 14.87 78.12 15.94Q81.01 22.68 81.01 30.06Q81.01 30.67 80.92 31.85Q80.82 33.03 80.82 33.64Q80.82 35.93 82.39 36.92Q84.02 37.72 86.99 37.72Q89.62 37.72 91.26 36.54Q93.12 35.20 92.97 32.69Q92.85 31.28 92.85 29.95Q92.85 22.91 95.25 16.40L97.42 15.83Q98.41 15.56 99.52 15.10Q95.79 22.22 95.79 29.80Q95.79 30.63 95.92 32.27Q96.05 33.91 96.05 34.71M98.18 35.58Q97.31 30.63 98.03 25.53Q98.79 20.36 101.19 15.98Q100.54 16.24 99.10 16.89Q99.48 16.05 100.28 14.49Q96.81 15.71 94.91 16.05Q92.55 22.56 92.55 29.83Q92.55 31.21 92.63 32.61Q92.78 35.01 90.99 36.23Q89.50 37.30 86.99 37.33Q84.21 37.37 82.77 36.61Q82.69 36.12 82.61 35.66Q82.58 35.16 82.69 34.67Q82.92 32.35 82.92 30.03Q82.92 24.20 81.40 18.30Q80.67 18.19 79.26 17.84Q78.84 16.51 78.39 15.60Q75.69 14.84 73.29 13.46Q77.89 21.04 77.89 29.76Q77.89 31.40 77.74 33.11Q77.51 35.51 77.59 36.69Q77.74 38.63 79.00 39.77Q79.99 42.25 84.63 42.63Q86.73 42.78 88.86 42.85Q94.22 43.04 97.00 42.09Q98.60 41.22 98.60 39.16Q98.64 38.06 98.18 35.58Z\"/><path fill=\"#111\" d=\"M20.92 49.63Q23.81 45.75 26.71 39.54Q23.59 32.99 17.49 24.92Q19.40 26.07 22.18 26.71Q25.72 31.40 28.15 36.61Q30.32 31.32 33.41 26.90Q35.61 26.56 37.71 25.76Q34.28 29.57 30.82 36.99L28.00 43.01Q26.55 46.13 24.80 48.76Q22.37 49.10 20.92 49.63M27.09 50.96Q28.80 48.07 30.25 44.80L32.99 38.48Q36.49 30.44 39.80 26.45Q38.47 27.13 36.57 27.82L37.59 26.41Q38.13 25.69 38.74 25Q36.07 26.07 33.22 26.52Q30.48 30.44 28.53 34.90Q26.90 31.59 25.11 28.77Q24.92 28.77 24.56 28.73Q24.19 28.69 24.00 28.69Q23.24 27.44 22.29 26.29Q19.13 25.65 16.39 23.93Q22.63 31.93 26.33 39.54Q24.16 44.61 20.08 50.24Q20.92 49.97 21.72 49.82L23.32 49.44Q22.71 50.16 21.53 51.80Q23.81 51.19 27.09 50.96Z\"/></svg>"}

,我想基于它生成图像。不幸的是,我在C#上找不到任何库。你知道我该怎么办吗?

0 个答案:

没有答案