示例#1
0
 public void UpdateShape(IShapeE newShape)
 {
     if (ShapeUpdated != null)
     {
         ShapeUpdated(this, new ShapeUpdateEventArgs(this, newShape));
     }
 }
 public override bool FullyContains(IShapeE shapeE)
 {
     if (shapeE == null)
     {
         return(false);
     }
     return(Contains(shapeE.BoundingBox));
 }
        public override bool MostlyContains(IShapeE shapeE, double tolerance)
        {
            if (shapeE == null)
            {
                return(false);
            }
            RectangleE intersect = Intersect(shapeE.BoundingBox);

            return(intersect.Area / Area > tolerance);
        }
示例#4
0
        public static int Compare(IShapeE a, IShapeE b)
        {
            if (a.Equals(b)) {
                return 0;
            }
            if (a == null || a.BoundingBox == null) {
                return -1;
            }
            if (b == null || b.BoundingBox == null) {
                return 1;
            }

            return b.BoundingBox.CompareTo(a.BoundingBox); 
        }
示例#5
0
        public static int Compare(IShapeE a, IShapeE b)
        {
            if (a.Equals(b))
            {
                return(0);
            }
            if (a == null || a.BoundingBox == null)
            {
                return(-1);
            }
            if (b == null || b.BoundingBox == null)
            {
                return(1);
            }

            return(b.BoundingBox.CompareTo(a.BoundingBox));
        }
示例#6
0
 public void UpdateShape(IShapeE newShape)
 {
     if (ShapeUpdated != null) {
         ShapeUpdated(this, new ShapeUpdateEventArgs(this, newShape));
     }
 }
示例#7
0
 public virtual bool FullyContains(IShapeE shapeE)
 {
     return false;
 }
示例#8
0
 public virtual bool MostlyContains(IShapeE shapeE, double tolerance)
 {
     return false;
 }
示例#9
0
 public bool MostlyContains(IShapeE shapeE)
 {
     return MostlyContains(shapeE, 0.95);
 }
示例#10
0
 public ShapeUpdateEventArgs(IShapeE oldShape, IShapeE newShape)
 {
     OldShape = oldShape;
     NewShape = newShape;
 }
示例#11
0
 public virtual bool FullyContains(IShapeE shapeE)
 {
     return(false);
 }
示例#12
0
 public virtual bool MostlyContains(IShapeE shapeE, double tolerance)
 {
     return(false);
 }
示例#13
0
 public bool MostlyContains(IShapeE shapeE)
 {
     return(MostlyContains(shapeE, 0.95));
 }
示例#14
0
 public ShapeUpdateEventArgs(IShapeE oldShape, IShapeE newShape)
 {
     OldShape = oldShape;
     NewShape = newShape;
 }