public void Refresh() { int count = rects.Count; if (count > 0) { Rect rect = new Rect(); rect = rects[0]; Rect tmp; for (int i = 1; i < count; i++) { tmp = rects[i]; rect = ToolSet.Union(ref rect, ref tmp); } SetSize(rect.xMax, rect.yMax); } else { SetSize(0, 0); } graphics.SetMeshDirty(); }
public void Refresh() { int count = rects.Count; if (count > 0) { Rectangle rect = new Rectangle(); rect = rects[0]; Rectangle tmp; for (int i = 1; i < count; i++) { tmp = rects[i]; rect = ToolSet.Union(ref rect, ref tmp); } SetSize(rect.Right, rect.Bottom); } else { SetSize(0, 0); } graphics.SetMeshDirty(); }