■ Path 엘리먼트에서 패스 미니 언어를 사용해 아이콘을 만드는 방법을 보여준다.
▶ MainWindow.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
<Window x:Class="TestProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="800" Height="600" Title="Path 엘리먼트 : 패스 미니 언어를 사용해 아이콘 만들기" Background="RoyalBlue" FontFamily="나눔고딕코딩" FontSize="16"> <Window.Resources> <Style TargetType="Path"> <Setter Property="Margin" Value="10" /> <Setter Property="Stroke" Value="White" /> <Setter Property="StrokeThickness" Value="2" /> </Style> </Window.Resources> <Grid Margin="10"> <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="500"> <Path Data=" M 22.785004 8.4599915 L 13.740021 17.51001 9.2100067 12.980011 6.2000122 16 13.740021 23.545013 25.804993 11.480011 z M 16 0 C 24.834991 0 32 7.1700134 32 16 32 24.834991 24.834991 32 16 32 7.1699982 32 0 24.834991 0 16 0 7.1700134 7.1699982 0 16 0 z" /> <Path Data=" M 20.200012 8.4000015 L 16 12.599998 11.800049 8.5 8.4000244 11.900002 12.600037 16.099998 8.4000244 20.300003 11.800049 23.699997 16 19.5 20.200012 23.699997 23.600037 20.300003 19.400024 16 23.600037 11.800003 z M 16 0 C 24.800049 0 32 7.1999969 32 16 32 24.800003 24.800049 32 16 32 7.2000122 32 0 24.800003 0 16 0 7.1999969 7.2000122 0 16 0 z" /> <Path Data="M 0 0 L 22.652 15.996998 0 31.999996 z" /> <Path Data="M 0 0 L 29.198001 0 29.198001 32 0 32 z" /> <Path Data=" M 18.51899 0 L 29.981999 0 29.981999 32 18.51899 32 z M 0 0 L 11.464992 0 11.464992 32 0 32 z " /> <Path Data=" M 0 0.7440033 L 18.551971 16.002998 0 31.255997 z M 18.551971 0 L 25.368 0 25.368 32 18.551971 32 18.551971 16.002998 z" /> <Path Data=" M 25.370002 0.7440033 L 25.370002 31.259995 6.8229996 16.003006 z M 0 0 L 6.8229996 0 6.8229996 16.003006 6.8229996 32 0 32 z" /> <Path Data=" M 23.700012 6.000006 L 27.5 6.000006 27.5 10.50001 32 10.50001 32 14.300002 27.5 14.300002 27.5 18.800006 23.700012 18.800006 23.700012 14.300002 19.200012 14.300002 19.200012 10.50001 23.700012 10.50001 z M 15.700012 0 L 15.700012 24.599999 7.8000488 17.300004 0 17.300004 0 7.9000323 7.9000244 7.9000323 z" /> <Path Data=" M 19.200012 10.399974 L 32 10.399974 32 14.300002 19.200012 14.300002 z M 15.700012 0 L 15.700012 24.599999 7.8000488 17.300004 0 17.300004 0 7.8999713 7.9000244 7.8999713 z" /> <Path Data=" M 22.800049 6.5999756 L 26 9.7999878 29.200012 6.5999756 32 9.4000244 28.800049 12.599976 32 15.799988 29.200012 18.599976 26 15.299988 22.800049 18.5 20 15.700012 23.200012 12.5 20 9.2999878 z M 16 0 L 16 25 8 17.5 0 17.5 0 8 8 8 z" /> <Path Data=" M 22.800049 6.5999756 L 26 9.7999878 29.200012 6.5999756 32 9.4000244 28.800049 12.599976 32 15.799988 29.200012 18.599976 26 15.299988 22.800049 18.5 20 15.700012 23.200012 12.5 20 9.2999878 z M 16 0 L 16 25 8 17.5 0 17.5 0 8 8 8 z" /> <Path Data=" M 26.899994 0 L 28.899994 0 28.899994 14.100006 C 30.699997 14.5 32 16.199997 32 18.100006 32 20 30.699997 21.699997 28.899994 22.100006 L 28.899994 29.899994 26.899994 29.899994 26.899994 22.100006 C 25.100006 21.699997 23.800003 20 23.800003 18.100006 23.800003 16.199997 25.100006 14.5 26.899994 14.100006 z M 15 0 L 17 0 17 10.199997 C 18.800003 10.600006 20.100006 12.300003 20.100006 14.199997 20.100006 16.100006 18.800003 17.800003 17 18.199997 L 17 30 15 30 15 18.199997 C 13.199997 17.800003 11.899994 16.100006 11.899994 14.199997 11.899994 12.300003 13.199997 10.600006 15 10.199997 z M 3.1000061 0 L 5.1000061 0 5.1000061 3.8000031 C 6.8999939 4.1999969 8.1999969 5.8999939 8.1999969 7.8000031 8.1999969 9.6999969 6.8999939 11.399994 5.1000061 11.800003 L 5.1000061 29.899994 3.1000061 29.899994 3.1000061 11.800003 C 1.3000031 11.399994 0 9.8000031 0 7.8000031 0 5.8999939 1.3000031 4.1999969 3.1000061 3.8000031 z" /> <Path Data=" M 0 10.999998 L 32 10.999998 29.400024 26.6 2.7000122 26.6 z M 2.7000122 0 L 13.5 0 13.5 3.3000179 29.400024 3.3000179 29.400024 7.2000106 2.7999878 7.2000106 2.7999878 3.6000056 z" /> <Path Data=" M 11.331985 10.669 C 11.137986 10.669 10.976986 10.731 10.852986 10.855999 10.728987 10.981 10.665987 11.141 10.665987 11.335 L 10.665987 14.668 C 10.665987 14.862 10.727986 15.021999 10.852986 15.146999 10.977986 15.271999 11.136986 15.334 11.331985 15.334 L 13.331984 15.334 13.331984 22 11.331985 22 C 11.137986 22 10.976986 22.063 10.852986 22.188 10.728987 22.313 10.665987 22.471999 10.665987 22.667 L 10.665987 26 C 10.665987 26.195 10.727986 26.354 10.852986 26.479 10.977986 26.604 11.136986 26.667 11.331985 26.667 L 20.665975 26.667 C 20.860975 26.667 21.019974 26.604 21.144974 26.479 21.269974 26.354 21.332974 26.193999 21.332974 26 L 21.330974 26.002 21.330974 22.667999 C 21.330974 22.474 21.267974 22.313999 21.143974 22.188999 21.019974 22.063999 20.859975 22.002 20.664975 22.002 L 18.665977 22.002 18.665977 11.335 C 18.665977 11.141 18.602977 10.981 18.477977 10.855999 18.352978 10.731 18.192978 10.669 17.998978 10.669 z M 13.999983 3.3329997 C 13.805983 3.3329997 13.646983 3.3959994 13.520984 3.5209994 13.394983 3.6459994 13.332984 3.8049994 13.332984 3.9999995 L 13.332984 7.3329997 C 13.332984 7.5269995 13.395984 7.6879995 13.520984 7.8119993 13.645983 7.9359996 13.805983 7.9989996 13.999983 7.9989996 L 17.999978 7.9989996 C 18.194978 7.9989996 18.353978 7.9369996 18.478977 7.8119993 18.603977 7.6869996 18.666977 7.5269995 18.666977 7.3329997 L 18.666977 3.9999995 C 18.666977 3.8049994 18.603977 3.6459994 18.478977 3.5209994 18.353978 3.3959994 18.193978 3.3329997 17.999978 3.3329997 z M 15.99998 0 C 18.902977 0 21.579974 0.7149992 24.030971 2.1459999 26.481968 3.5769997 28.422966 5.5179996 29.853964 7.9689994 L 29.855964 7.9689994 C 31.285962 10.42 32.000961 13.097 32.000961 16 32.000961 18.901999 31.285962 21.58 29.854964 24.030999 28.423966 26.482 26.482968 28.424 24.031971 29.854 21.579974 31.285 18.901977 32 15.99998 32 13.097983 32 10.419987 31.285 7.9689894 29.854 5.517992 28.423 3.5769958 26.482 2.1459961 24.030999 0.71499825 21.58 0 18.901999 0 16 0 13.098 0.71499825 10.421 2.1459961 7.9689994 3.5769958 5.5169997 5.517992 3.5769997 7.9689894 2.1459999 10.419987 0.7149992 13.096984 0 15.99998 0 z" /> <Path Data=" M 9.6560059 19.516005 L 12.484985 22.345999 6.414978 28.413002 10 32 0 32 0 21.999998 3.5849915 25.585007 z M 22.342987 19.512999 L 28.412994 25.585007 32 21.999998 32 32 22 32 25.584991 28.413002 19.513 22.345999 z M 22 0 L 32 0 32 10.000001 28.414978 6.4129991 22.342987 12.486002 19.513 9.6559991 25.584991 3.5849995 z M 0 0 L 10 0 6.414978 3.5849995 12.483978 9.6569986 9.6569824 12.485002 3.5849915 6.4129991 0 10.000001 z" /> <Path Data=" M 11.170988 2.0000026 C 6.1139962 2.0000026 1.9999944 6.1120075 1.9999944 11.16603 1.9999944 16.219991 6.1139962 20.331996 11.170988 20.331996 16.227981 20.331996 20.341006 16.219991 20.341006 11.16603 20.341006 6.1120075 16.227981 2.0000026 11.170988 2.0000026 z M 11.170988 0 C 17.33003 0 22.341001 5.0089787 22.341001 11.16603 22.341001 13.76351 21.449155 16.156669 19.95551 18.055608 L 19.942527 18.071714 31.999898 30.615001 30.5589 32.001003 18.567029 19.525854 18.476871 19.605846 C 16.516895 21.303544 13.961804 22.332 11.170988 22.332 5.0119487 22.332 1.6168633E-07 17.32302 0 11.16603 1.6168633E-07 5.0089787 5.0119487 0 11.170988 0 z" /> <Path Data=" M 12.126984 0 L 19.872009 0 19.872009 12.128 32 12.128 32 19.872999 19.872009 19.872999 19.872009 31.999 12.126984 31.999 12.126984 19.872999 0 19.872999 0 12.128 12.126984 12.128 z" /> <Path Data=" M 3.1999965 13.899994 L 3.1999965 16.699982 28.299994 16.699982 28.299994 13.899994 z M 9.4000006 4.1999817 L 6.900001 9.2999878 2.6999965 10.199982 30.400001 10.199982 30.400001 32 0.90000152 32 0.90000152 10.199982 0 6.1999817 z M 18.900001 2.0999756 L 16.400001 7.2999878 11.099998 8.3999939 13.599998 3.1999817 z M 28.900001 0 L 29.799994 4.3999939 20.499999 6.3999939 22.999999 1.1999817 z" /> <Path Data=" M 4.7140198 5.9829999 C 3.2170105 5.983 2 7.1789839 1.9999998 8.6499922 L 1.9999998 16.899992 C 2 18.370024 3.2170105 19.566008 4.7140198 19.566008 L 6.5710144 19.566008 C 7.1230164 19.566008 7.5710144 20.013029 7.5710144 20.566008 L 7.5710144 24.797026 13.346008 19.808989 C 13.527008 19.652006 13.759003 19.566008 14 19.566008 L 23.286011 19.566008 C 24.782013 19.566008 26 18.370024 26 16.899992 L 26 8.6499922 C 26 7.1789839 24.782013 5.983 23.286011 5.9829999 z M 4.7140198 3.9830001 L 23.286011 3.9830001 C 25.88501 3.983 28 6.0769942 28 8.6499922 L 28 16.899992 C 28 19.47299 25.88501 21.566008 23.286011 21.566008 L 14.372009 21.566008 7.2250061 27.740019 C 7.0390015 27.899992 6.8059998 27.983 6.5710144 27.983 6.4300232 27.983 6.2879944 27.954008 6.1549988 27.891997 5.7990112 27.728972 5.5710144 27.375029 5.5710144 26.983 L 5.5710144 21.566008 4.7140198 21.566008 C 2.1140137 21.566008 0 19.47299 0 16.899992 L 0 8.6499922 C 0 6.0769942 2.1140137 3.983 4.7140198 3.9830001 z M 8.7690067 0 L 27.340012 0 C 29.940012 0 31.985012 2.0220022 31.985012 4.5960051 L 31.985012 12.846013 C 31.985012 14.439016 31.199011 16.034017 29.985012 17.019018 L 29.985012 12.846013 29.985012 4.5960051 29.985012 4.0000043 C 29.985012 2.8950031 29.08901 2.0000021 27.98501 2.0000021 L 27.340012 2.0000021 8.7690067 2.0000021 4.8220062 2.0000021 C 5.6920061 0.78600097 7.1490064 0 8.7690067 0 z" /> <Path Data=" M 13.889349 21 C 13.556349 22.530001 12.529347 23.947001 11.559345 25 L 20.424358 25 C 19.456356 23.952 18.436356 22.541 18.108355 21 z M 11.177001 2.9690175 L 11.884002 3.6760178 3.7079973 11.852022 3.0009971 11.145021 z M 7.4799972 2.8810134 L 8.1869965 3.5880151 3.6199985 8.1550264 2.9129992 7.4480247 z M 2 2 L 2 19 12.999348 19 18.999357 19 30 19 30 2z M 1 0 L 31 0 C 31.552002 0 32 0.44702148 32 1 L 32 20 C 32 20.552979 31.552002 21 31 21 L 20.17979 21 20.245712 21.181469 C 20.917463 22.900454 22.785048 24.591875 23.598362 25.198 23.943363 25.455999 24.084364 25.906 23.949364 26.315001 23.813364 26.724001 23.430363 27 22.999363 27 L 8.999342 27 C 8.5703411 27 8.1893406 26.726 8.0523405 26.319 7.9153404 25.912001 8.0533409 25.464001 8.3953409 25.202999 9.2094669 24.583063 11.079845 22.868586 11.752615 21.164507 L 11.813042 21 1 21 C 0.44799805 21 0 20.552979 0 20 L 0 1 C 0 0.44702148 0.44799805 0 1 0 z" /> <Path Data=" M 23.400024 1.2999864 C 22.700012 1.2999863 22 1.9999978 22 2.7999844 L 22 8.900015 C 22 9.7000019 22.600037 10.400013 23.400024 10.400013 24.200012 10.400013 24.799988 9.7000019 24.799988 8.900015 L 24.799988 2.7999844 C 24.799988 1.9999978 24.200012 1.2999863 23.400024 1.2999864 z M 23.400024 0 C 24.900024 -1.4086982E-07 26.100037 1.2000108 26.100037 2.7999844 L 26.100037 2.900021 30.100037 2.900021 C 31.100037 2.9000212 32 3.7999836 32 4.9000188 L 32 6.6000296 C 32 7.7000038 31.200012 8.6000272 30.100037 8.6000272 L 26.100037 8.6000272 26.100037 8.900015 C 26.100037 10.400013 24.900024 11.7 23.400024 11.7 21.900024 11.7 20.700012 10.499989 20.700012 8.900015 L 20.700012 8.6000272 1.9000244 8.6000272 C 0.90002441 8.6000272 0 7.7000038 0 6.6000296 L 0 4.9000188 C 0 3.7999836 0.79998779 2.9000212 1.9000244 2.900021 L 20.799988 2.900021 20.799988 2.7999844 C 20.799988 1.2000108 22 -1.4086982E-07 23.400024 0 z" /> <Path Data=" M 26.394612 15.579789 L 23.719562 21.156862 26.29761 20.020854 26.736613 20.145857 29.102667 20.954893 z M 25.999992 0 C 28.208992 0 29.999992 1.7910004 29.999992 4 29.999992 6.2090001 28.208992 8 25.999992 8 24.20518 8 22.686313 6.8176603 22.179837 5.1894259 L 22.126257 5.0007625 22.086252 5.0007501 C 21.393502 5.0004997 20.603502 5 20.084002 5L7.8310013 5C4.6160011 5 2 7.6420002 2 10.889 L 2 24.111 C 2 27.358 4.6160011 29.999999 7.8310013 29.999999 L 19.542002 29.999999 C 22.757003 29.999999 25.373003 27.358 25.373003 24.111 L 25.390384 22.605316 22.293543 23.973934 C 22.152533 24.036923 22.00153 24.066953 21.85254 24.066953 21.561535 24.066953 21.275519 23.951961 21.064517 23.735953 20.746518 23.40892 20.663509 22.911901 20.85852 22.497892 L 25.385592 13.058745 C 25.565602 12.681723 25.939602 12.441729 26.360614 12.435686 26.388615 12.434687 26.416244 12.434691 26.443486 12.43567 26.852113 12.450347 27.173562 12.684165 27.352636 13.035734 L 31.882713 22.027912 C 32.083706 22.433926 32.022716 22.909887 31.727713 23.24693 31.432693 23.581898 30.969688 23.705923 30.547684 23.561938 L 27.391997 22.483538 27.373003 24.123 C 27.373003 28.460999 23.860003 31.999999 19.542002 31.999999 L 7.8310013 31.999999 C 3.5130005 31.999999 0 28.460999 0 24.111 L 0 10.889 C 0 6.539 3.5130005 3 7.8310013 3 L 20.085002 3 C 20.603002 3 21.388752 3.0007505 22.077378 3.0011253 L 22.125755 3.0011482 22.125932 3.0003843 C 22.569885 1.2750387 24.136149 0 25.999992 0 z" /> </WrapPanel> </Grid> </Window> |