예제 #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;
 }