private static bool IsPathVisible(Path path) { if (string.IsNullOrEmpty(path.PathData)) { return false; } if (!string.IsNullOrEmpty(path.FillColor) && path.FillAlpha > 0) { return true; } if (!string.IsNullOrEmpty(path.StrokeColor) && path.StrokeAlpha > 0 && path.StrokeWidth > 0) { return true; } return false; }
private static void ResetIneffectiveAttributes(Path path) { if (string.IsNullOrEmpty(path.FillColor) || path.FillAlpha == 0) { path.FillColor = null; path.FillAlpha = 1; } if (string.IsNullOrEmpty(path.StrokeColor) || path.StrokeAlpha == 0 || path.StrokeWidth == 0) { path.StrokeColor = null; path.StrokeAlpha = 1; path.StrokeWidth = 0; } }