Within() private méthode

private Within ( Rectangle2D other ) : bool
other Rectangle2D
Résultat bool
 //对于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);
         }
     }
 }
 //int最大值32765的一半16382.5,最大支持16383
 private void SetClip(FeatureElement fe, Rectangle2D clipBox)
 {
     Rectangle2D bounds = fe.Geometry.Bounds;
     if ((Rectangle2D.IsNullOrEmpty(bounds)) || ((bounds.Width / this.Resolution) < 16383.5))
     {
         if (fe.ClippedGeometry != null)
         {
             fe.ClearClip();
         }
     }
     else if (((Rectangle2D.IsNullOrEmpty(fe.ClipBox)) || !clipBox.Within(fe.ClipBox)) || ((fe.ClipBox.Width / this.Resolution) >= 16383.5))
     {
         if (fe.Geometry is GeoRegion)
         {
             fe.SetClip(new GeoRegionClip(clipBox).Clip(fe.Geometry as GeoRegion), clipBox);
         }
         else if (fe.Geometry is GeoLine)
         {
             fe.SetClip(new GeoLineClip(clipBox).Clip(fe.Geometry as GeoLine), clipBox);
         }
     }
 }