SuperMap.WindowsPhone.Core.FeatureElement.ClearClip C# (CSharp) Method

ClearClip() private method

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

Usage Example

 //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);
         }
     }
 }