Adding that extra branching in drawVerticalLine may be small but WILL slow things down for code that does not need to flip. There may be an argument for an extra function (e.g., drawVerticalLineChecked…?) but flipping it mannually is pretty trivial.
Yeah, the method is designed for drawing things like waveforms, so needs to go as fast as possible, which is why it’s the caller’s responsibility to provide valid input. But I will double-check that the comments make it clear about those requirements…