public Rectangle FindExtents() { Rectangle foundRegion = Rectangle.Empty; for (int y = StartY; y < EndY; y++) { for (int x = StartX; x < EndX; x++) { if (this[x, y]) { foundRegion = RectangleExtensions.UnionIgnoreEmpty(foundRegion, new Rectangle(x, y, 1, 1)); // TODO: PERF: This is horribly inefficient } } } return(foundRegion); }