Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor/FPF/PresentationCore/System.Windows.Media.GeometryGroup.cs')
-rw-r--r--src/Editor/FPF/PresentationCore/System.Windows.Media.GeometryGroup.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Editor/FPF/PresentationCore/System.Windows.Media.GeometryGroup.cs b/src/Editor/FPF/PresentationCore/System.Windows.Media.GeometryGroup.cs
new file mode 100644
index 0000000..3bfc123
--- /dev/null
+++ b/src/Editor/FPF/PresentationCore/System.Windows.Media.GeometryGroup.cs
@@ -0,0 +1,27 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace System.Windows.Media
+{
+ public class GeometryGroup : System.Windows.Media.Geometry
+ {
+ public List<Geometry> Children { get; } = new List<Geometry>();
+
+ public override Rect Bounds
+ {
+ get
+ {
+ if (Children.Count == 0)
+ return Rect.Empty;
+ var union = Children[0].Bounds;
+ foreach (var c in Children.Skip(1))
+ union.Union(c.Bounds);
+ return union;
+ }
+ }
+ public override bool IsEmpty()
+ {
+ return !Children.Any(c => !c.IsEmpty());
+ }
+ }
+} \ No newline at end of file