public static double GetHalfStrokeWidth(PathElement pathElement) { if ((Brush)pathElement.GetComputedValueAsWpf(ShapeElement.StrokeProperty) != null) { double d = (double)pathElement.GetComputedValue(ShapeElement.StrokeThicknessProperty); if (!double.IsNaN(d) && !double.IsInfinity(d)) { return(Math.Abs(d) / 2.0); } } return(0.0); }