Skip to content

Instantly share code, notes, and snippets.

@jogibear9988
Created January 21, 2015 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jogibear9988/ab71c793b8d0bb729d13 to your computer and use it in GitHub Desktop.
Save jogibear9988/ab71c793b8d0bb729d13 to your computer and use it in GitHub Desktop.
Test Cases:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Button Content="Button"
Width="75"
Height="23"
Canvas.Left="128"
Canvas.Top="97" />
<Path Fill="#CCCCFF"
Stroke="Black"
StrokeThickness="1"
Canvas.Left="72.6"
Canvas.Top="240">
<Path.Data>
<!-- Creates a composite shape from three geometries. -->
<GeometryGroup FillRule="EvenOdd">
<LineGeometry StartPoint="10,10" EndPoint="50,30" />
<EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
<RectangleGeometry Rect="30,55 100 30" />
</GeometryGroup>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Button Content="Button"
Width="75"
Height="23"
Canvas.Left="128"
Canvas.Top="97" />
<Path Fill="#CCCCFF"
Stroke="Black"
StrokeThickness="1"
Canvas.Left="72.6"
Canvas.Top="240">
<Path.Data>
<!-- Creates a composite shape from three geometries. -->
<CombinedGeometry>
<CombinedGeometry.Geometry1>
<EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<RectangleGeometry Rect="30,55 100 30" />
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Path Fill="#CCCCFF"
Stroke="Black"
StrokeThickness="1"
Canvas.Left="64"
Canvas.Top="164.5">
<Path.Data>
<!-- Creates a composite shape from three geometries. -->
<GeometryGroup>
<PathGeometry Figures="M0,0L0,0L22.6666666666666,75.3333333333333L34,46.6666666666667L46,82.6666666666667L82.6666666666666,42.6666666666667L96.6666666666666,91.3333333333333L142,51.3333333333333L150.666666666667,88.6666666666667L306,98L296,61.3333333333333L370.666666666667,146.666666666667" />
<GeometryGroup FillRule="EvenOdd">
<LineGeometry StartPoint="10,10" EndPoint="50,30" />
<EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
<RectangleGeometry Rect="30,55 100 30" />
</GeometryGroup>
</GeometryGroup>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Path Margin="93,56,277.035,190.84"
Fill="#FFF4F4F5"
Stretch="Fill"
Stroke="Black">
<Path.Data>
<StreamGeometry>
M150.77036,85.421501 L148.74716,86.002968 C140.37247,88.254791 131.16498,89.5 121.5,89.5 111.83501,89.5 102.62753,88.254791 94.252838,86.002972 L93.5,85.786606 93.5,138.79258 94.053612,138.78882 C106.61694,138.54271 118.46339,135.52435 130.50014,127.49986 148.8356,115.27625 150.91786,103.32245 150.81303,88.033772 z M225.23241,52.076152 L225.59306,52.121458 C228.37724,52.402526 230.62875,52.309617 229.83183,54.242061 L229.71127,54.485531 229.14326,54.191226 C227.95673,53.57149 226.69139,52.894059 225.33565,52.134794 z M218.50015,48.500001 L222.50015,50.499996 C222.99397,50.793032 223.47688,51.075187 223.94933,51.347355 L225.23241,52.076152 224.2794,51.956441 C222.05745,51.608034 219.74934,50.819918 218.50015,48.500001 z M121.5,0.5 C160.15993,0.5 191.5,20.423328 191.5,45.000001 191.5,54.216252 187.0928,62.778128 179.5451,69.880373 L177.75679,71.479061 179.9185,71.396465 C185.73831,71.12915 191.56923,70.578312 197.50015,69.499966 209.94583,67.237118 217.80615,67.193968 225.50015,59.499981 227.71982,57.280325 229.00154,55.767313 229.59267,54.725051 L229.71127,54.485531 230.30397,54.792619 C240.14322,59.853534 244.35483,61.185095 250.50015,74.499956 255.82964,86.047142 253.45424,106.05729 247.50015,113.49989 237.1293,126.46344 236.04279,123.59135 221.50015,126.49987 195.37457,131.72498 181.50015,135.29324 181.50015,153.49982 181.50015,197.73853 165.61774,194.49976 140.50014,194.49976 101.54394,194.49976 72.347946,197.98041 51.50013,172.49979 44.172749,163.54411 41.536594,156.02055 41.635677,150.08342 L41.670158,149.5 0.5,149.5 0.5,48.499997 51.714752,48.499997 51.704113,48.42385 C51.568863,47.293838 51.5,46.152031 51.5,45.000001 51.5,20.423328 82.840065,0.5 121.5,0.5 z
</StreamGeometry>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Path Fill="#CCCCFF"
Stroke="Black"
StrokeThickness="1"
Canvas.Left="64"
Canvas.Top="164.5">
<Path.Data>
<!-- Creates a composite shape from three geometries. -->
<GeometryGroup>
<PathGeometry Figures="M0,0L0,0L22.6666666666666,75.3333333333333L34,46.6666666666667L46,82.6666666666667L82.6666666666666,42.6666666666667L96.6666666666666,91.3333333333333L142,51.3333333333333L150.666666666667,88.6666666666667L306,98L296,61.3333333333333L370.666666666667,146.666666666667" />
<GeometryGroup FillRule="EvenOdd">
<LineGeometry StartPoint="10,10" EndPoint="50,30" />
<EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
<RectangleGeometry Rect="30,55 100 30" />
<StreamGeometry>
M150.77036,85.421501 L148.74716,86.002968 C140.37247,88.254791 131.16498,89.5 121.5,89.5 111.83501,89.5 102.62753,88.254791 94.252838,86.002972 L93.5,85.786606 93.5,138.79258 94.053612,138.78882 C106.61694,138.54271 118.46339,135.52435 130.50014,127.49986 148.8356,115.27625 150.91786,103.32245 150.81303,88.033772 z M225.23241,52.076152 L225.59306,52.121458 C228.37724,52.402526 230.62875,52.309617 229.83183,54.242061 L229.71127,54.485531 229.14326,54.191226 C227.95673,53.57149 226.69139,52.894059 225.33565,52.134794 z M218.50015,48.500001 L222.50015,50.499996 C222.99397,50.793032 223.47688,51.075187 223.94933,51.347355 L225.23241,52.076152 224.2794,51.956441 C222.05745,51.608034 219.74934,50.819918 218.50015,48.500001 z M121.5,0.5 C160.15993,0.5 191.5,20.423328 191.5,45.000001 191.5,54.216252 187.0928,62.778128 179.5451,69.880373 L177.75679,71.479061 179.9185,71.396465 C185.73831,71.12915 191.56923,70.578312 197.50015,69.499966 209.94583,67.237118 217.80615,67.193968 225.50015,59.499981 227.71982,57.280325 229.00154,55.767313 229.59267,54.725051 L229.71127,54.485531 230.30397,54.792619 C240.14322,59.853534 244.35483,61.185095 250.50015,74.499956 255.82964,86.047142 253.45424,106.05729 247.50015,113.49989 237.1293,126.46344 236.04279,123.59135 221.50015,126.49987 195.37457,131.72498 181.50015,135.29324 181.50015,153.49982 181.50015,197.73853 165.61774,194.49976 140.50014,194.49976 101.54394,194.49976 72.347946,197.98041 51.50013,172.49979 44.172749,163.54411 41.536594,156.02055 41.635677,150.08342 L41.670158,149.5 0.5,149.5 0.5,48.499997 51.714752,48.499997 51.704113,48.42385 C51.568863,47.293838 51.5,46.152031 51.5,45.000001 51.5,20.423328 82.840065,0.5 121.5,0.5 z
</StreamGeometry>
</GeometryGroup>
</GeometryGroup>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Button Content="Button"
Width="75"
Height="23"
Canvas.Left="128"
Canvas.Top="97" />
<Path Fill="#CCCCFF"
Stroke="Black"
StrokeThickness="1"
Canvas.Left="72.6"
Canvas.Top="240">
<Path.Data>
<!-- Creates a composite shape from three geometries. -->
<CombinedGeometry>
<CombinedGeometry.Geometry1>
<EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<StreamGeometry>
M150.77036,85.421501 L148.74716,86.002968 C140.37247,88.254791 131.16498,89.5 121.5,89.5 111.83501,89.5 102.62753,88.254791 94.252838,86.002972 L93.5,85.786606 93.5,138.79258 94.053612,138.78882 C106.61694,138.54271 118.46339,135.52435 130.50014,127.49986 148.8356,115.27625 150.91786,103.32245 150.81303,88.033772 z M225.23241,52.076152 L225.59306,52.121458 C228.37724,52.402526 230.62875,52.309617 229.83183,54.242061 L229.71127,54.485531 229.14326,54.191226 C227.95673,53.57149 226.69139,52.894059 225.33565,52.134794 z M218.50015,48.500001 L222.50015,50.499996 C222.99397,50.793032 223.47688,51.075187 223.94933,51.347355 L225.23241,52.076152 224.2794,51.956441 C222.05745,51.608034 219.74934,50.819918 218.50015,48.500001 z M121.5,0.5 C160.15993,0.5 191.5,20.423328 191.5,45.000001 191.5,54.216252 187.0928,62.778128 179.5451,69.880373 L177.75679,71.479061 179.9185,71.396465 C185.73831,71.12915 191.56923,70.578312 197.50015,69.499966 209.94583,67.237118 217.80615,67.193968 225.50015,59.499981 227.71982,57.280325 229.00154,55.767313 229.59267,54.725051 L229.71127,54.485531 230.30397,54.792619 C240.14322,59.853534 244.35483,61.185095 250.50015,74.499956 255.82964,86.047142 253.45424,106.05729 247.50015,113.49989 237.1293,126.46344 236.04279,123.59135 221.50015,126.49987 195.37457,131.72498 181.50015,135.29324 181.50015,153.49982 181.50015,197.73853 165.61774,194.49976 140.50014,194.49976 101.54394,194.49976 72.347946,197.98041 51.50013,172.49979 44.172749,163.54411 41.536594,156.02055 41.635677,150.08342 L41.670158,149.5 0.5,149.5 0.5,48.499997 51.714752,48.499997 51.704113,48.42385 C51.568863,47.293838 51.5,46.152031 51.5,45.000001 51.5,20.423328 82.840065,0.5 121.5,0.5 z
</StreamGeometry>
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
</Path>
</Canvas>
</Window>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas>
<Path Data="M150.77036,85.421501 L148.74716,86.002968 C140.37247,88.254791 131.16498,89.5 121.5,89.5 111.83501,89.5 102.62753,88.254791 94.252838,86.002972 L93.5,85.786606 93.5,138.79258 94.053612,138.78882 C106.61694,138.54271 118.46339,135.52435 130.50014,127.49986 148.8356,115.27625 150.91786,103.32245 150.81303,88.033772 z M225.23241,52.076152 L225.59306,52.121458 C228.37724,52.402526 230.62875,52.309617 229.83183,54.242061 L229.71127,54.485531 229.14326,54.191226 C227.95673,53.57149 226.69139,52.894059 225.33565,52.134794 z M218.50015,48.500001 L222.50015,50.499996 C222.99397,50.793032 223.47688,51.075187 223.94933,51.347355 L225.23241,52.076152 224.2794,51.956441 C222.05745,51.608034 219.74934,50.819918 218.50015,48.500001 z M121.5,0.5 C160.15993,0.5 191.5,20.423328 191.5,45.000001 191.5,54.216252 187.0928,62.778128 179.5451,69.880373 L177.75679,71.479061 179.9185,71.396465 C185.73831,71.12915 191.56923,70.578312 197.50015,69.499966 209.94583,67.237118 217.80615,67.193968 225.50015,59.499981 227.71982,57.280325 229.00154,55.767313 229.59267,54.725051 L229.71127,54.485531 230.30397,54.792619 C240.14322,59.853534 244.35483,61.185095 250.50015,74.499956 255.82964,86.047142 253.45424,106.05729 247.50015,113.49989 237.1293,126.46344 236.04279,123.59135 221.50015,126.49987 195.37457,131.72498 181.50015,135.29324 181.50015,153.49982 181.50015,197.73853 165.61774,194.49976 140.50014,194.49976 101.54394,194.49976 72.347946,197.98041 51.50013,172.49979 44.172749,163.54411 41.536594,156.02055 41.635677,150.08342 L41.670158,149.5 0.5,149.5 0.5,48.499997 51.714752,48.499997 51.704113,48.42385 C51.568863,47.293838 51.5,46.152031 51.5,45.000001 51.5,20.423328 82.840065,0.5 121.5,0.5 z" Fill="#FFF4F4F5" Margin="93,56,277.035,190.84" Stretch="Fill" Stroke="Black"/>
</Canvas>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment