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