public Rectangle GetBoundingBoxRounded(bool constrainToImage) { Rectangle bounds = RectangleUtilities.RoundInflate(BoundingBox); if (constrainToImage) { bounds.Intersect(new Rectangle(0, 0, ImageSize.Width - 1, ImageSize.Height - 1)); } return bounds; }