Took another look at a piece of code I wasn't happy with and proved that half of the conditionals were redundant. Took those out, which let me sensibly remove a temporary variable and did a couple other minor tweaks and now I have something that's shorter (both width and height), earlier to understand, runs faster (though that won't be noticed by anybody), and has exactly the same behavior.
@neal I love that feeling.