SuperMap.WindowsPhone.Core.Rectangle2D.Within C# (CSharp) Method

Within() private method

private Within ( Rectangle2D other ) : bool
other Rectangle2D
return bool
        internal bool Within(Rectangle2D other)
        {
            return ((((this.Left >= other.Left) && (this.Right <= other.Right)) && (this.Bottom >= other.Bottom)) && (this.Top <= other.Top));
        }

Usage Example

 //对于SL自带的Rectangle暂不做处理
 private void SetClipShapeBase(ShapeElement sb, Rectangle2D clipBox)
 {
     Rectangle2D bounds = sb.Point2Ds.GetBounds();
     if ((Rectangle2D.IsNullOrEmpty(bounds)) || ((bounds.Width / this.Resolution) < 16383.5))
     {
         if (sb.ClippedPoint2Ds != null)
         {
             sb.ClearClip();
         }
     }
     else if (((Rectangle2D.IsNullOrEmpty(sb.ClipBox)) || !clipBox.Within(sb.ClipBox)) || ((sb.ClipBox.Width / this.Resolution) >= 16383.5))
     {
         if (sb is PolygonElement)
         {
             sb.SetClip(new PolygonElementClip(clipBox).Clip(sb.Point2Ds), clipBox);
         }
         else if (sb is PolylineElement)
         {
             sb.SetClip(new PolylineElementClip(clipBox).Clip(sb.Point2Ds), clipBox);
         }
     }
 }
All Usage Examples Of SuperMap.WindowsPhone.Core.Rectangle2D::Within