GeometryDrawing 요소의 Geometry 속성 최대 길이...?

검색을 못하는건지 결과가 원하는 게 잘 안나오네요.

svg 이미지를 아래 프로그램을 통해서 path 로 변경했습니다.

그런데 Path 가 너무 긴지 변환 해서 붙여넣으니까 아래 사진처럼 정상적인 코드를 코드로 인식으로 못하고 텍스트 파일처럼 인식합니다.

path인식왜못함

Geometry 길이가 36000 정도 됩니다.

너무 길어서 인식을 못하는 걸까요?

테스트를 해본 내용 공유 드려요.

준비

SvgXaml

공유드린 오픈 소스 툴 중 SvgXaml를 사용해서 인터넷의 svg로 컨버팅 해 봤습니다.

SharpVectors.exe 를 실행합니다.

이미지를 추가 한 모습

xaml 컨버팅 모습


이렇게 svg to xaml을 진행하고, 데모용 WPF를 준비했습니다.

데모

App.xaml에 리소스 추가

App.xaml에 xaml 이미지 리소스를 사용하기 위해 DrawingBrush를 정의하고, Drawing 속성으로
툴에서 컨버팅된 “DrawingGroup” 을 추가 합니다.

<Application x:Class="DrawingDemo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:DrawingDemo"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <DrawingBrush x:Key="SvgBrush" Stretch="Fill">
            <DrawingBrush.Drawing>
                <DrawingGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <DrawingGroup x:Name="DrawingLayer">
    <DrawingGroup.ClipGeometry>
      <RectangleGeometry Rect="0,0,5000,3569.272" />
    </DrawingGroup.ClipGeometry>
    <DrawingGroup.Transform>
      <TranslateTransform X="6.98341173119843E-05" Y="-0" />
    </DrawingGroup.Transform>
    <DrawingGroup>
      <GeometryDrawing Brush="#FF000000">
        <GeometryDrawing.Geometry>
          <PathGeometry FillRule="Nonzero" Figures="M3470.541,3289.347C3443.8,3262.639 3429.5570000000002,3262.6740000000004 3421.5260000000003,3295.4300000000003 3415.8160000000003,3318.722 3404.034,3317.782 3388.1980000000003,3317.8140000000003 3334.4660000000003,3317.9220000000005 3280.733,3317.8550000000005 3225.039,3317.8550000000005 3234.1130000000003,3339.7320000000004 3232.8030000000003,3352.3960000000006 3206.436,3348.7400000000007 3160.9320000000002,3342.4300000000007 3114.7830000000004,3339.8110000000006 3077.826,3306.321000000001 3065.665,3295.301000000001 3047.391,3293.659000000001 3032.303,3298.7290000000007 3004.299,3308.138000000001 3050.471,3360.8240000000005 2982.328,3368.8360000000007 2956.043,3371.9270000000006 2929.572,3368.6500000000005 2903.973,3382.0550000000007 2888.8379999999997,3389.980000000001 2877.939,3376.937000000001 2873.14,3360.190000000001 2855.7149999999997,3299.384000000001 2883.1639999999998,3270.907000000001 2850.3759999999997,3221.452000000001 2795.499,3138.680000000001 2808.0009999999997,3131.008000000001 2744.4849999999997,3139.1110000000012 2708.0229999999997,3143.762000000001 2682.9429999999998,3173.0870000000014 2646.7989999999995,3176.389000000001 2622.8759999999997,3178.574000000001 2636.8199999999997,3233.362000000001 2573.4999999999995,3217.846000000001 2520.8159999999993,3204.936000000001 2501.3089999999997,3211.926000000001 2432.3509999999997,3195.800000000001 2414.2749999999996,3191.5730000000012 2408.9509999999996,3182.177000000001 2410.506,3164.335000000001 2414.009,3124.149000000001 2416.5009999999997,3083.850000000001 2418.307,3043.547000000001 2420.203,3001.239000000001 2411.928,2991.195000000001 2370.0469999999996,2996.476000000001 2314.1889999999994,3003.520000000001 2257.8179999999998,3011.283000000001 2203.6689999999994,3026.065000000001 2095.6579999999994,3055.550000000001 1984.8799999999994,3067.021000000001 1874.9129999999996,3084.036000000001 1763.5579999999995,3101.266000000001 1657.6039999999996,3148.204000000001 1590.1429999999996,3153.957000000001 1429.5459999999996,3167.6550000000007 1381.9759999999997,3253.3290000000006 1169.8969999999995,3291.3020000000006 1040.1399999999994,3314.5350000000008 1000.0849999999995,3262.2490000000007 930.5179999999995,3293.5830000000005 907.6119999999995,3303.9000000000005 880.3869999999995,3303.6040000000007 858.5909999999994,3292.9470000000006 809.7599999999994,3269.0720000000006 760.4169999999995,3283.5380000000005 711.3459999999994,3285.5470000000005 687.0669999999994,3286.5410000000006 663.1349999999994,3294.1690000000003 638.8319999999994,3296.8510000000006 595.8699999999994,3301.5920000000006 566.7359999999994,3322.4440000000004 549.6229999999994,3362.8820000000005 531.4499999999994,3405.8270000000007 514.6249999999993,3412.9700000000007 468.7569999999994,3405.4840000000004 416.06299999999936,3396.8840000000005 378.26699999999937,3365.5650000000005 344.5259999999994,3327.0520000000006 281.08199999999937,3254.6350000000007 201.33499999999938,3215.4070000000006 104.90399999999937,3210.4440000000004 78.57499999999936,3209.0890000000004 54.804999999999374,3188.5500000000006 26.487999999999374,3200.1070000000004 21.750999999999372,3202.0400000000004 17.743999999999374,3197.0410000000006 14.419999999999375,3193.3480000000004 -20.788000000000622,3154.2360000000003 6.633999999999375,3036.2950000000005 117.07599999999938,3052.4220000000005 178.15599999999938,3061.3410000000003 241.2539999999994,3041.3430000000003 303.69999999999936,3048.7550000000006 357.20499999999936,3055.1060000000007 410.39999999999935,3066.4820000000004 464.56099999999935,3059.2560000000008 533.9049999999993,3050.004000000001 603.7929999999993,3051.098000000001 673.3489999999994,3046.266000000001 701.3289999999994,3044.323000000001 727.6129999999994,3032.741000000001 756.1739999999994,3031.4770000000008 775.4169999999995,3030.6260000000007 783.3559999999994,3012.263000000001 780.4889999999995,2996.4070000000006 776.2339999999995,2972.8740000000007 772.5529999999994,2948.3690000000006 798.2399999999994,2939.8950000000004 825.6569999999995,2930.8510000000006 856.6799999999994,2928.5310000000004 881.8289999999995,2950.5410000000006 915.9299999999995,2980.3840000000005 914.3149999999995,3003.4470000000006 950.1549999999995,2996.3750000000005 1064.5579999999995,2973.8010000000004 1176.8259999999996,2942.7200000000003 1286.2669999999996,2903.1690000000003 1342.2579999999996,2882.934 1389.3119999999997,2841.1140000000005 1448.4739999999997,2826.539 1504.5999999999997,2812.7110000000002 1557.9039999999998,2790.827 1612.4849999999997,2772.5640000000003 1670.3219999999997,2753.2110000000002 1718.1899999999996,2715.8570000000004 1770.9219999999996,2687.4260000000004 1823.3399999999995,2659.164 1883.8349999999996,2633.9780000000005 2024.6369999999995,2580.3030000000003 2034.8959999999995,2576.3920000000003 2041.2379999999994,2569.7160000000003 2039.7349999999994,2558.1320000000005 2038.2109999999996,2546.3890000000006 2029.8809999999994,2541.9410000000007 2019.2109999999993,2540.7990000000004 1948.9089999999994,2533.2720000000004 1879.6089999999992,2513.9390000000003 1807.9219999999993,2522.7180000000003 1782.5939999999994,2525.82 1761.8609999999994,2529.1710000000003 1760.0129999999992,2490.2650000000003 1758.6499999999992,2461.572 1730.4219999999993,2439.2960000000003 1726.1379999999992,2408.197 1723.8929999999993,2391.898 1705.4699999999993,2398.451 1694.8859999999993,2395.8030000000003 1631.3279999999993,2379.9040000000005 1630.2999999999993,2380.03 1643.9469999999992,2314.6890000000003 1647.9489999999992,2295.5270000000005 1643.2419999999993,2285.418 1625.3009999999992,2277.6730000000002 1575.5139999999992,2256.179 1546.3349999999994,2249.893 1558.7149999999992,2216.2740000000003 1560.4419999999993,2211.5840000000003 1556.9759999999992,2204.4770000000003 1554.7709999999993,2198.9420000000005 1549.1689999999992,2184.8800000000006 1529.0789999999993,2176.4210000000003 1536.7289999999994,2157.4510000000005 1547.1489999999994,2131.6130000000003 1553.5469999999993,2102.7560000000003 1578.8609999999994,2086.0280000000002 1591.6369999999995,2077.585 1595.9289999999994,2067.675 1595.7879999999993,2052.4170000000004 1595.0749999999994,1974.7100000000005 1668.6669999999992,1983.8590000000004 1626.9569999999994,1946.9550000000004 1599.3269999999993,1922.5090000000005 1574.9869999999994,1895.1530000000005 1551.9539999999995,1866.3100000000004 1537.0219999999995,1847.6120000000003 1538.2569999999996,1834.8980000000004 1557.5269999999996,1820.6840000000004 1595.6199999999997,1792.5860000000005 1612.3299999999995,1756.5280000000005 1664.2489999999996,1745.6600000000003 1681.1579999999997,1742.1200000000003 1697.5209999999995,1736.6780000000003 1712.5569999999996,1728.2390000000003 1737.4869999999996,1714.2490000000003 1740.2209999999995,1704.2790000000002 1722.5409999999995,1682.0670000000002 1695.0639999999994,1647.5480000000002 1674.0649999999996,1608.3520000000003 1643.4909999999995,1576.0080000000003 1626.5359999999996,1558.0710000000004 1634.1199999999994,1523.9950000000003 1657.4399999999996,1506.4980000000003 1676.3399999999997,1492.3170000000002 1702.4699999999996,1485.8880000000004 1702.2889999999995,1454.1250000000002 1701.7969999999996,1367.7180000000003 1495.6429999999996,1238.3300000000002 1380.9699999999996,1060.1430000000003 1312.6799999999996,954.0310000000003 1238.3719999999996,851.8580000000003 1173.9099999999996,743.2450000000002 1168.9699999999996,734.9210000000003 1163.2419999999997,726.6470000000003 1156.3059999999996,719.9890000000003 1093.5009999999995,659.7040000000003 1032.9509999999996,597.1770000000002 968.5049999999997,538.4640000000003 737.34,327.865 747.469,247.952 648.401,237.866 479.5949999999999,220.679 489.659,190.98700000000002 464.159,192.09400000000002 438.52,193.20700000000002 421.531,192.02800000000002 440.474,158.48800000000003 451.832,138.37800000000004 428.786,134.84400000000002 415.949,132.55200000000002 305.243,112.78600000000003 202.935,114.26100000000002 210.449,74.79300000000002 213.11700000000002,60.77700000000002 226.121,66.85100000000003 234.912,65.48700000000002 251.877,62.85400000000002 261.281,51.62000000000002 263.769,36.41700000000002 266.746,18.222000000000023 278.60200000000003,12.092000000000024 293.706,8.878000000000021 449.507,-24.272999999999982 413.69800000000004,43.343000000000025 643.7429999999999,81.69500000000002 742.4309999999999,98.14700000000002 818.8979999999999,146.89800000000002 885.8159999999999,216.854 992.824,328.719 1121.04,417.01 1230.55,526.131 1240.969,536.5129999999999 1254.665,544.857 1261.79,557.0889999999999 1299.982,622.6529999999999 1359.9569999999999,669.3879999999999 1406.451,727.5699999999999 1532.388,885.165 1553.348,947.06 1649.983,993.001 1707.329,1020.2629999999999 1763.2089999999998,1049.235 1811.896,1092.94 1917.49,1187.7330000000002 2004.906,1154.948 1982.453,1080.6470000000002 1973.8419999999999,1052.1530000000002 1956.99,1027.7110000000002 1945.968,1000.4390000000002 1940.1940000000002,986.1520000000002 1926.5420000000001,978.7830000000002 1913.26,972.0630000000002 1880.4279999999999,955.4500000000003 1848.163,937.5310000000002 1814.516,922.7700000000002 1786.392,910.4320000000002 1767.7140000000002,894.1930000000002 1765.074,861.1360000000002 1762.9070000000002,834.0030000000002 1747.028,810.8740000000003 1735.9470000000001,786.4040000000002 1717.1000000000001,744.7860000000002 1723.661,697.1210000000002 1705.3860000000002,654.9250000000002 1699.3720000000003,641.0400000000002 1710.304,628.7040000000002 1721.294,620.4200000000002 1739.018,607.0590000000002 1742.603,589.9260000000002 1742.077,568.7950000000002 1740.603,509.5560000000002 1760.113,458.4050000000002 1805.363,418.39200000000017 1844.2540000000001,384.00100000000015 1858.449,319.8910000000002 2007.804,327.2320000000002 2137.375,333.6010000000002 2142.568,373.1110000000002 2172.736,342.4130000000002 2209.118,305.3910000000002 2280.942,302.4630000000002 2317.595,337.2450000000002 2334.504,353.29100000000017 2348.7729999999997,372.4700000000002 2375.564,371.34700000000015 2377.736,371.25600000000014 2381.652,372.79400000000015 2381.966,374.1990000000001 2389.2599999999998,406.83800000000014 2422.391,426.09500000000014 2426.057,460.8000000000001 2429.897,497.15500000000014 2423.7969999999996,508.6680000000001 2389.8349999999996,522.9840000000002 2345.6579999999994,541.6050000000001 2339.1189999999997,563.9020000000002 2341.4879999999994,611.9330000000001 2345.0839999999994,684.8300000000002 2346.957999999999,760.0000000000001 2293.3519999999994,820.3800000000001 2266.2129999999993,850.9490000000001 2257.7709999999993,886.4760000000001 2259.8699999999994,925.7570000000001 2261.4999999999995,956.2550000000001 2270.3209999999995,964.6690000000001 2300.205999999999,966.1540000000001 2325.0479999999993,967.3880000000001 2346.673999999999,960.2160000000001 2362.546999999999,940.8240000000001 2434.959999999999,852.355 2532.054999999999,810.788 2641.650999999999,792.124 2673.452999999999,786.708 2702.473999999999,773.881 2729.494999999999,755.991 2803.082999999999,707.271 2913.605999999999,633.154 2957.840999999999,577.847 3015.111999999999,506.24199999999996 3038.2929999999988,530.76 3365.470999999999,270.501 3410.380999999999,234.77599999999998 3410.343999999999,258.774 3492.6479999999992,178.98499999999996 3543.1549999999993,130.02199999999996 3605.483999999999,97.28999999999996 3669.5569999999993,68.75199999999995 3681.2719999999995,63.53399999999995 3695.872999999999,60.35399999999996 3696.3759999999993,79.85899999999995 3696.939999999999,101.74199999999995 3711.5219999999995,100.45099999999995 3726.1779999999994,103.34299999999996 3755.7849999999994,109.18399999999995 3788.1949999999993,111.05099999999996 3795.5859999999993,151.11499999999995 3802.9349999999995,190.94699999999995 3777.7049999999995,184.55399999999995 3738.8689999999992,173.41699999999994 3707.2909999999993,164.36099999999993 3682.8339999999994,164.16299999999995 3667.2379999999994,191.25299999999993 3659.2179999999994,205.18499999999992 3669.6369999999993,214.57399999999993 3677.8049999999994,223.27599999999993 3700.457999999999,247.40899999999993 3722.9429999999993,271.73599999999993 3755.0679999999993,284.2729999999999 3765.4439999999995,288.3219999999999 3782.7619999999993,291.1929999999999 3775.792999999999,308.0109999999999 3770.678999999999,320.3509999999999 3755.959999999999,321.7319999999999 3743.419999999999,318.78399999999993 3673.955999999999,302.4529999999999 3640.6459999999993,242.87099999999992 3630.293999999999,292.75199999999995 3628.000999999999,303.799 3617.339999999999,307.18399999999997 3607.558999999999,308.775 3561.656999999999,316.243 3528.311999999999,352.236 3483.6609999999987,363.01099999999997 3465.844999999999,367.30999999999995 3398.8349999999987,468.74699999999996 3190.1249999999986,681.634 3153.3969999999986,719.097 3112.252999999999,783.607 3044.462999999999,807.263 2983.5069999999987,828.534 2909.1899999999987,947.178 2787.0669999999986,1019.058 2718.8099999999986,1059.233 2649.9999999999986,1090.337 2669.9579999999987,1166.691 2717.6849999999986,1349.28 2655.5519999999988,1426.694 2740.2699999999986,1639.276 2758.2349999999988,1684.357 2776.5769999999984,1729.895 2789.616999999999,1777.246 2797.9619999999986,1807.548 2812.963999999999,1836.612 2845.150999999999,1850.217 2857.2659999999987,1855.3380000000002 2872.987999999999,1856.961 2872.927999999999,1839.1850000000002 2872.728999999999,1779.7680000000003 2923.447999999999,1765.6230000000003 2959.991999999999,1740.7830000000001 3014.107999999999,1703.997 3046.996999999999,1727.6370000000002 3119.6409999999987,1648.4340000000002 3151.038999999999,1614.2010000000002 3190.237999999999,1594.1950000000002 3231.1399999999985,1581.7110000000002 3280.5779999999986,1566.6220000000003 3393.8269999999984,1517.4160000000002 3415.9509999999987,1537.6910000000003 3451.328999999999,1570.1130000000003 3500.509999999999,1583.2340000000002 3532.4059999999986,1619.3900000000003 3672.7309999999984,1778.4570000000003 3612.2609999999986,1842.3210000000004 3722.9909999999986,1821.5920000000003 3762.377999999999,1814.2190000000003 3991.243999999999,1778.2170000000003 4031.5359999999987,1780.7430000000004 4051.8729999999987,1782.0180000000005 4062.612999999999,1788.4140000000004 4066.520999999999,1809.5220000000004 4073.3189999999986,1846.2340000000004 4085.0199999999986,1877.3180000000004 4128.692999999998,1889.8590000000004 4158.315999999998,1898.3660000000004 4184.262999999998,1920.3310000000004 4211.178999999998,1937.3450000000005 4254.163999999998,1964.5150000000006 4218.6579999999985,2025.1050000000005 4239.5149999999985,2092.5850000000005 4252.5909999999985,2134.8900000000003 4183.351999999999,2141.3510000000006 4218.279999999999,2177.9080000000004 4250.660999999999,2211.8 4239.104999999999,2251.858 4237.052999999999,2291.9040000000005 4232.829999999999,2374.3200000000006 4218.595999999999,2457.5550000000003 4246.684999999999,2538.7000000000003 4252.356999999998,2555.0860000000002 4256.568999999999,2570.8750000000005 4238.4389999999985,2580.5040000000004 4200.189999999999,2600.8190000000004 4199.814999999999,2638.4180000000006 4206.103999999998,2669.9380000000006 4216.365999999998,2721.3760000000007 4184.760999999999,2753.2190000000005 4161.788999999999,2788.8530000000005 4153.037999999999,2802.4280000000003 4137.290999999999,2812.5250000000005 4131.921999999999,2829.3250000000007 4127.676999999999,2842.6060000000007 4116.479999999999,2846.6900000000005 4106.379999999998,2853.5840000000007 4081.9849999999983,2870.2350000000006 4081.327999999998,2897.147000000001 4105.792999999998,2914.1480000000006 4156.974999999998,2949.7150000000006 4201.163999999998,2994.5070000000005 4254.493999999998,3026.9510000000005 4276.964999999997,3040.6210000000005 4304.180999999998,3043.5280000000007 4327.2019999999975,3058.5460000000003 4360.618999999998,3080.3450000000003 4390.117999999998,3102.4730000000004 4407.787999999998,3140.8370000000004 4420.173999999998,3167.7280000000005 4452.586999999998,3187.2800000000007 4477.4519999999975,3188.8140000000003 4529.305999999998,3192.0130000000004 4565.499999999997,3223.9900000000002 4608.588999999997,3242.7250000000004 4673.395999999997,3270.9030000000002 4712.716999999997,3257.1580000000004 4754.088999999997,3287.1700000000005 4776.401999999997,3303.3570000000004 4864.1259999999975,3273.3370000000004 4938.923999999997,3387.3230000000003 4952.930999999997,3408.6690000000003 4969.106999999997,3428.318 4983.455999999997,3449.3280000000004 5013.705999999997,3493.6210000000005 5002.6439999999975,3530.8380000000006 4948.852999999997,3544.9830000000006 4907.418999999997,3555.879000000001 4864.037999999998,3557.303000000001 4822.351999999997,3568.1800000000007 4806.082999999997,3572.4250000000006 4790.546999999997,3563.6020000000008 4777.900999999997,3554.1210000000005 4681.238999999997,3481.6560000000004 4531.748999999997,3477.2250000000004 4437.806999999997,3387.0060000000003 4406.175999999997,3356.628 4367.024999999997,3335.041 4328.524999999997,3313.195 4306.961999999997,3300.9590000000003 4283.052999999997,3306.531 4261.440999999997,3296.3120000000004 4218.3449999999975,3275.9370000000004 4175.100999999997,3254.2000000000003 4129.606999999997,3240.972 4062.2589999999973,3221.3900000000003 3998.0409999999974,3195.688 3936.0109999999972,3163.6220000000003 3911.262999999997,3150.829 3909.117999999997,3173.2050000000004 3816.1009999999974,3153.463 3787.2819999999974,3147.347 3767.2699999999973,3157.313 3745.1629999999973,3176.235 3720.762999999997,3197.121 3689.3799999999974,3209.25 3667.2009999999973,3234.683 3660.367999999997,3242.519 3651.7569999999973,3248.826 3645.6389999999974,3258.236 3609.117999999997,3314.41 3588.0759999999973,3267.603 3568.7739999999976,3288.153 3525,3334.756 3524.858,3343.635 3470.541,3289.347z" />
        </GeometryDrawing.Geometry>
      </GeometryDrawing>
      <GeometryDrawing Brush="#FF000000">
        <GeometryDrawing.Geometry>
          <PathGeometry FillRule="Nonzero" Figures="M3471.418,3290.223C3468.839,3294.398 3474.6620000000003,3291.993 3469.81,3292.709 3469.292,3292.786 3468.581,3291.5609999999997 3467.96,3290.94 3471.059,3289.027 3470.313,3289.118 3471.418,3290.223z" />
        </GeometryDrawing.Geometry>
      </GeometryDrawing>
    </DrawingGroup>
  </DrawingGroup>
</DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </Application.Resources>
</Application>

MainWindow

MainWindow.xaml에서 App에 정의한 브러시를 사용합니다.

<Rectangle Width="1024" Height="768" Stroke="Black" Fill="{StaticResource SvgBrush}">
</Rectangle>

결과

잘 해결 되시길~ :clinking_glasses:

좋아요 2

사용하신 SvgToXaml으로 생성해 봤는데 DrawingGroup이 아닌 DrawingImage으로 생성하네요.
Image 엘리먼트에 적용해야 되서 추가로 공유 드려요.

App.xaml

<DrawingImage x:Key="SvgImage">
  <DrawingImage.Drawing>
    <DrawingGroup ClipGeometry="M0,0 V3569.272 H5000 V0 H0 Z">
      <DrawingGroup.Transform>
        <TranslateTransform X="6.98341173119843E-05" Y="0" />
      </DrawingGroup.Transform>
      <DrawingGroup Opacity="1">
        <GeometryDrawing Brush="#FF000000" Geometry="F1 M5000,3569.272z M0,0z M3470.541,3289.347C3443.8,3262.639 3429.557,3262.674 3421.526,3295.43 3415.816,3318.722 3404.034,3317.782 3388.198,3317.814 3334.466,3317.922 3280.733,3317.855 3225.039,3317.855 3234.113,3339.732 3232.803,3352.396 3206.436,3348.74 3160.932,3342.43 3114.783,3339.811 3077.826,3306.321 3065.665,3295.301 3047.391,3293.659 3032.303,3298.729 3004.299,3308.138 3050.471,3360.824 2982.328,3368.836 2956.043,3371.927 2929.572,3368.65 2903.973,3382.055 2888.838,3389.98 2877.939,3376.937 2873.14,3360.19 2855.715,3299.384 2883.164,3270.907 2850.376,3221.452 2795.499,3138.68 2808.001,3131.008 2744.485,3139.111 2708.023,3143.762 2682.943,3173.087 2646.799,3176.389 2622.876,3178.574 2636.82,3233.362 2573.5,3217.846 2520.816,3204.936 2501.309,3211.926 2432.351,3195.8 2414.275,3191.573 2408.951,3182.177 2410.506,3164.335 2414.009,3124.149 2416.501,3083.85 2418.307,3043.547 2420.203,3001.239 2411.928,2991.195 2370.047,2996.476 2314.189,3003.52 2257.818,3011.283 2203.669,3026.065 2095.658,3055.55 1984.88,3067.021 1874.913,3084.036 1763.558,3101.266 1657.604,3148.204 1590.143,3153.957 1429.546,3167.655 1381.976,3253.329 1169.897,3291.302 1040.14,3314.535 1000.085,3262.249 930.517999999999,3293.583 907.612,3303.9 880.386999999999,3303.604 858.590999999999,3292.947 809.759999999999,3269.072 760.416999999999,3283.538 711.345999999999,3285.547 687.066999999999,3286.541 663.134999999999,3294.169 638.831999999999,3296.851 595.869999999999,3301.592 566.735999999999,3322.444 549.622999999999,3362.882 531.449999999999,3405.827 514.624999999999,3412.97 468.756999999999,3405.484 416.062999999999,3396.884 378.266999999999,3365.565 344.525999999999,3327.052 281.081999999999,3254.635 201.334999999999,3215.407 104.903999999999,3210.444 78.5749999999994,3209.089 54.8049999999994,3188.55 26.4879999999994,3200.107 21.7509999999994,3202.04 17.7439999999994,3197.041 14.4199999999994,3193.348 -20.7880000000006,3154.236 6.63399999999938,3036.295 117.075999999999,3052.422 178.155999999999,3061.341 241.253999999999,3041.343 303.699999999999,3048.755 357.204999999999,3055.106 410.399999999999,3066.482 464.560999999999,3059.256 533.904999999999,3050.004 603.792999999999,3051.098 673.348999999999,3046.266 701.328999999999,3044.323 727.612999999999,3032.741 756.173999999999,3031.477 775.416999999999,3030.626 783.355999999999,3012.263 780.488999999999,2996.407 776.233999999999,2972.874 772.552999999999,2948.369 798.239999999999,2939.895 825.656999999999,2930.851 856.679999999999,2928.531 881.828999999999,2950.541 915.929999999999,2980.384 914.314999999999,3003.447 950.155,2996.375 1064.558,2973.801 1176.826,2942.72 1286.267,2903.169 1342.258,2882.934 1389.312,2841.114 1448.474,2826.539 1504.6,2812.711 1557.904,2790.827 1612.485,2772.564 1670.322,2753.211 1718.19,2715.857 1770.922,2687.426 1823.34,2659.164 1883.835,2633.978 2024.637,2580.303 2034.896,2576.392 2041.238,2569.716 2039.735,2558.132 2038.211,2546.389 2029.881,2541.941 2019.211,2540.799 1948.909,2533.272 1879.609,2513.939 1807.922,2522.718 1782.594,2525.82 1761.861,2529.171 1760.013,2490.265 1758.65,2461.572 1730.422,2439.296 1726.138,2408.197 1723.893,2391.898 1705.47,2398.451 1694.886,2395.803 1631.328,2379.904 1630.3,2380.03 1643.947,2314.689 1647.949,2295.527 1643.242,2285.418 1625.301,2277.673 1575.514,2256.179 1546.335,2249.893 1558.715,2216.274 1560.442,2211.584 1556.976,2204.477 1554.771,2198.942 1549.169,2184.88 1529.079,2176.421 1536.729,2157.451 1547.149,2131.613 1553.547,2102.756 1578.861,2086.028 1591.637,2077.585 1595.929,2067.675 1595.788,2052.417 1595.075,1974.71 1668.667,1983.859 1626.957,1946.955 1599.327,1922.509 1574.987,1895.153 1551.954,1866.31 1537.022,1847.612 1538.257,1834.898 1557.527,1820.684 1595.62,1792.586 1612.33,1756.528 1664.249,1745.66 1681.158,1742.12 1697.521,1736.678 1712.557,1728.239 1737.487,1714.249 1740.221,1704.279 1722.541,1682.067 1695.064,1647.548 1674.065,1608.352 1643.491,1576.008 1626.536,1558.071 1634.12,1523.995 1657.44,1506.498 1676.34,1492.317 1702.47,1485.888 1702.289,1454.125 1701.797,1367.718 1495.643,1238.33 1380.97,1060.143 1312.68,954.031 1238.372,851.858 1173.91,743.245 1168.97,734.921 1163.242,726.647 1156.306,719.989 1093.501,659.704 1032.951,597.177 968.505,538.464 737.34,327.865 747.469,247.952 648.401,237.866 479.595,220.679 489.659,190.987 464.159,192.094 438.52,193.207 421.531,192.028 440.474,158.488 451.832,138.378 428.786,134.844 415.949,132.552 305.243,112.786 202.935,114.261 210.449,74.793 213.117,60.777 226.121,66.851 234.912,65.487 251.877,62.854 261.281,51.62 263.769,36.417 266.746,18.222 278.602,12.092 293.706,8.87800000000002 449.507,-24.273 413.698,43.343 643.743,81.695 742.431,98.147 818.898,146.898 885.816,216.854 992.824,328.719 1121.04,417.01 1230.55,526.131 1240.969,536.513 1254.665,544.857 1261.79,557.089 1299.982,622.653 1359.957,669.388 1406.451,727.57 1532.388,885.165 1553.348,947.06 1649.983,993.001 1707.329,1020.263 1763.209,1049.235 1811.896,1092.94 1917.49,1187.733 2004.906,1154.948 1982.453,1080.647 1973.842,1052.153 1956.99,1027.711 1945.968,1000.439 1940.194,986.152 1926.542,978.783 1913.26,972.063 1880.428,955.45 1848.163,937.531 1814.516,922.77 1786.392,910.432 1767.714,894.193 1765.074,861.136 1762.907,834.003 1747.028,810.874 1735.947,786.404 1717.1,744.786 1723.661,697.121 1705.386,654.925 1699.372,641.04 1710.304,628.704 1721.294,620.42 1739.018,607.059 1742.603,589.926 1742.077,568.795 1740.603,509.556 1760.113,458.405 1805.363,418.392 1844.254,384.001 1858.449,319.891 2007.804,327.232 2137.375,333.601 2142.568,373.111 2172.736,342.413 2209.118,305.391 2280.942,302.463 2317.595,337.245 2334.504,353.291 2348.773,372.47 2375.564,371.347 2377.736,371.256 2381.652,372.794 2381.966,374.199 2389.26,406.838 2422.391,426.095 2426.057,460.8 2429.897,497.155 2423.797,508.668 2389.835,522.984 2345.658,541.605 2339.119,563.902 2341.488,611.933 2345.084,684.83 2346.958,760 2293.352,820.38 2266.213,850.949 2257.771,886.476 2259.87,925.757 2261.5,956.255 2270.321,964.669 2300.206,966.154 2325.048,967.388 2346.674,960.216 2362.547,940.824 2434.96,852.355 2532.055,810.788 2641.651,792.124 2673.453,786.708 2702.474,773.881 2729.495,755.991 2803.083,707.271 2913.606,633.154 2957.841,577.847 3015.112,506.242 3038.293,530.76 3365.471,270.501 3410.381,234.776 3410.344,258.774 3492.648,178.985 3543.155,130.022 3605.484,97.29 3669.557,68.752 3681.272,63.5339999999999 3695.873,60.354 3696.376,79.859 3696.94,101.742 3711.522,100.451 3726.178,103.343 3755.785,109.184 3788.195,111.051 3795.586,151.115 3802.935,190.947 3777.705,184.554 3738.869,173.417 3707.291,164.361 3682.834,164.163 3667.238,191.253 3659.218,205.185 3669.637,214.574 3677.805,223.276 3700.458,247.409 3722.943,271.736 3755.068,284.273 3765.444,288.322 3782.762,291.193 3775.793,308.011 3770.679,320.351 3755.96,321.732 3743.42,318.784 3673.956,302.453 3640.646,242.871 3630.294,292.752 3628.001,303.799 3617.34,307.184 3607.559,308.775 3561.657,316.243 3528.312,352.236 3483.661,363.011 3465.845,367.31 3398.835,468.747 3190.125,681.634 3153.397,719.097 3112.253,783.607 3044.463,807.263 2983.507,828.534 2909.19,947.178 2787.067,1019.058 2718.81,1059.233 2650,1090.337 2669.958,1166.691 2717.685,1349.28 2655.552,1426.694 2740.27,1639.276 2758.235,1684.357 2776.577,1729.895 2789.617,1777.246 2797.962,1807.548 2812.964,1836.612 2845.151,1850.217 2857.266,1855.338 2872.988,1856.961 2872.928,1839.185 2872.729,1779.768 2923.448,1765.623 2959.992,1740.783 3014.108,1703.997 3046.997,1727.637 3119.641,1648.434 3151.039,1614.201 3190.238,1594.195 3231.14,1581.711 3280.578,1566.622 3393.827,1517.416 3415.951,1537.691 3451.329,1570.113 3500.51,1583.234 3532.406,1619.39 3672.731,1778.457 3612.261,1842.321 3722.991,1821.592 3762.378,1814.219 3991.244,1778.217 4031.536,1780.743 4051.873,1782.018 4062.613,1788.414 4066.521,1809.522 4073.319,1846.234 4085.02,1877.318 4128.693,1889.859 4158.316,1898.366 4184.263,1920.331 4211.179,1937.345 4254.164,1964.515 4218.658,2025.105 4239.515,2092.585 4252.591,2134.89 4183.352,2141.351 4218.28,2177.908 4250.661,2211.8 4239.105,2251.858 4237.053,2291.904 4232.83,2374.32 4218.596,2457.555 4246.685,2538.7 4252.357,2555.086 4256.569,2570.875 4238.439,2580.504 4200.19,2600.819 4199.815,2638.418 4206.104,2669.938 4216.366,2721.376 4184.761,2753.219 4161.789,2788.853 4153.038,2802.428 4137.291,2812.525 4131.922,2829.325 4127.677,2842.606 4116.48,2846.69 4106.38,2853.584 4081.985,2870.235 4081.328,2897.147 4105.793,2914.148 4156.975,2949.715 4201.164,2994.507 4254.494,3026.951 4276.965,3040.621 4304.181,3043.528 4327.202,3058.546 4360.619,3080.345 4390.118,3102.473 4407.788,3140.837 4420.174,3167.728 4452.587,3187.28 4477.452,3188.814 4529.306,3192.013 4565.5,3223.99 4608.589,3242.725 4673.396,3270.903 4712.717,3257.158 4754.089,3287.17 4776.402,3303.357 4864.126,3273.337 4938.924,3387.323 4952.931,3408.669 4969.107,3428.318 4983.456,3449.328 5013.706,3493.621 5002.644,3530.838 4948.853,3544.983 4907.419,3555.879 4864.038,3557.303 4822.352,3568.18 4806.083,3572.425 4790.547,3563.602 4777.901,3554.121 4681.239,3481.656 4531.749,3477.225 4437.807,3387.006 4406.176,3356.628 4367.025,3335.041 4328.525,3313.195 4306.962,3300.959 4283.053,3306.531 4261.441,3296.312 4218.345,3275.937 4175.101,3254.2 4129.607,3240.972 4062.259,3221.39 3998.041,3195.688 3936.011,3163.622 3911.263,3150.829 3909.118,3173.205 3816.101,3153.463 3787.282,3147.347 3767.27,3157.313 3745.163,3176.235 3720.763,3197.121 3689.38,3209.25 3667.201,3234.683 3660.368,3242.519 3651.757,3248.826 3645.639,3258.236 3609.118,3314.41 3588.076,3267.603 3568.774,3288.153 3525,3334.756 3524.858,3343.635 3470.541,3289.347z" />
        <GeometryDrawing Brush="#FF000000" Geometry="F1 M5000,3569.272z M0,0z M3471.418,3290.223C3468.839,3294.398 3474.662,3291.993 3469.81,3292.709 3469.292,3292.786 3468.581,3291.561 3467.96,3290.94 3471.059,3289.027 3470.313,3289.118 3471.418,3290.223z" />
      </DrawingGroup>
    </DrawingGroup>
  </DrawingImage.Drawing>
</DrawingImage>

MainWindow

<Image Width="1024" Height="768" Source="{StaticResource SvgImage}"></Image>

작성하다보니 저랑 동일하게 하신 것 같네요. 사이즈 이슈가 아닐지 궁금하네요.
혹시 사용하신 이미지 공유가 가능할까요?

좋아요 2

답변 감사드립니다.

혹시 저 svg의 pathgeometry 문자열 길이가 얼마나 될까요?

제가 궁금한 것은 위 오픈소스 프로그램을 이용해서 되는지 안되는 지가 아니라, 런타임에서 문제없이 잘 됩니다.

그런데 문제는 visual studio 상에서 36000자 이상의 path geometry를 xaml 페이지에서 코딩하면

그 밑에 줄 부터는 visual studio가 xaml파일을 txt 파일처럼 인식해서 인텔리센스도 동작을 안하고 기본 들여쓰기도 안된다는 점입니다.

회사 이미지 파일이라 이미지를 올려드릴 수 없어서 견본이 좀 어렵네요 죄송합니다…ㅠㅠ

뭔가 svg를 path로 변환했을 때 36000자 이상의 문자열이 나오는 이미지라면 테스트 가능할 듯 한데… 그걸 찾아서 다시 올려야겠네요…

시간 내주셔서 감사드립니다!

좋아요 1

말씀처럼 36000자가 넘어가니까 인텔리센스가 깨지네요.

Path 길이가 697759인 이미지인데 잘 나오는 것 같아요.

처음에 사용했던 SvgXaml 툴에서 이미지 로드해서 Preview 가 잘 나오는지 한번 확인해보시는 것도 좋을 것 같아요.

좋아요 2

네 런타임에서는 저도 잘 나오는데…

인텔리센스가 깨지니까 이거 참 커밋도 못하겠어서 난감하네요…

제가 이러면 다른 팀원도 이렇게 나올꺼라…갑자기 왜이렇게 된거냐고 물어볼거기 때문에…;

해결방법을 알고 싶은데 잘 안나오네요.

혹시 모르니 Microsoft Q&A에도 질문 올려보겠습니다.

시간 내주셔서 감사드립니다.

좋아요 1

저는 런타임에서 안나오는줄 알고 말씀드렸는데 헛짚었네요 ;;;

시간이 좀 걸린다면 2가지 정도로 해결해 볼수 있을 것 같아요.

  • Output Path를 일정 단위로 나누어서 여러 엘리먼트로 구성하기
  • ResourceDictionary를 구성해서 리소스 따로 구성하기

잘 해결 되시길 바랄게요~!

좋아요 3

감사합니다

Microsoft Q&A에도 같은 질문올렸는데 회신오면 여기에 남기겠습니다.

일단은 그냥 별도 코드파일에 두고 바인딩해서 해놨습니다. ㅠㅠ

정적인건 xaml에 최대한 하는 걸 좋아하는데…가치관이 와장창

좋아요 2

Microsoft Q&A에 답변이 달렸습니다.


인텔리센스의 문제일 수 있으며, 그냥 Geometry 값을 적당히 콤마기준으로 줄바꿈해서 쓰라고 합니다.

근데 결정적으로 저는 XAML Styler 라는 것을 사용하는데 xaml 파일이 저장이 되면 xaml styler가 본인 설정파일의 설정 포멧에 맞게 xaml을 정리해줍니다.
그러면서 엔터쳐서 분리한 Geometry 데이터가 다시 합쳐지네요.
옵션을 찾아봐도 이 부분만 적용시키지 않는 부분은 아직 없는 것 같습니다.

그냥… 지금처럼 cs 파일에다가 Geometry를 남겨야겠네요…

좋아요 1

DrawingGroup을 여러개 두고 안에 GeometryDrawing을 하나씩 정의하면 제 아무리 xaml styler 라도 못 합칠 것 같기는 하네요. :smile:
다운로드 수는 많지 않던데 xaml styler 많이들 쓰시나 봐요~
확장으로 쓰면서 국내서 얼마나 쓸까 궁금했는데 쓰시고 계시다니 잘 선택 했다는 안도감이 ㅎㅎ

좋아요 2

이게…한번 써보니까 되돌아올 수 없는 강을 건넌 느낌입니다…ㅎㅎ

좋아요 2