protected void DrawGeometry(WindowRenderTarget device, Color color, float strokeWidth, params Vector2[] points) { using (PathGeometry gmtry = CreatePathGeometry(points)) { using (SolidColorBrush brush = new SolidColorBrush(device, color)) { device.DrawGeometry(gmtry, brush, strokeWidth); } } }
protected void DrawPolygon(WindowRenderTarget device, Color color, Vector2 start, Vector2 middle, Vector2 end, float strokeWidth = 1f) { using (PathGeometry gmtry = CreatePathGeometry(start, middle, end)) { using (SolidColorBrush brush = new SolidColorBrush(device, color)) { device.DrawGeometry(gmtry, brush); } } }