SuperMap.WinRT.Core.ShapeElement.ClearClip C# (CSharp) Method

ClearClip() private method

private ClearClip ( ) : void
return void
        internal void ClearClip()
        {
            this.ClipBox = Rectangle2D.Empty;
            if (this.ClippedPoint2Ds!= null)
            {
                this.ClippedPoint2Ds = null;
                this.InvalidatePath(this.Resolution, this.OriginX, this.OriginY);
            }
        }

Usage Example

 //对于SL自带的Rectangle暂不做处理
 private void SetClipShapeBase(ShapeElement sb, Rectangle2D clipBox, double resolution)
 {
     Rectangle2D bounds = sb.Point2Ds.GetBounds();
     if ((Rectangle2D.IsNullOrEmpty(bounds)) || ((bounds.Width / resolution) < 16383.5))
     {
         if (sb.ClippedPoint2Ds != null)
         {
             sb.ClearClip();
         }
     }
     else if (((Rectangle2D.IsNullOrEmpty(sb.ClipBox)) || !clipBox.Within(sb.ClipBox)) || ((sb.ClipBox.Width / 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);
         }
     }
 }