Style nit: `for (var x = bounds.X; x < bounds.Width; x++)`

There should also be spaces in `while (` and `if (`