Exercise all four SetRotation modes in the demo. Fix epd2in13.Size(),
which reported the padded logical buffer width instead of the true
panel width at rotation 90 and 270. This clipped the last few rows on
those rotations because the driver bounds check used the true width
while Size() reported the padded width.
Scale the dither ramp and solid block to the panel height instead of
fixed pixel offsets, so they fit inside the shorter 122 pixel dimension
at rotation 90 and 270.
The previoius behavior was that entirely black pixels were treated as
white, and anything else as black. That's at least counter-intuitive.
This patch changes the behavior to actually look at the color values and
use a cutoff around medium gray: darker colors are treated as black, and
lighter colors are treated as white.
This is a backwards incompatible change, but I think this behavior makes
a lot more sense.
This commit updates rotation behavior to match other displays.
For more information, see: https://github.com/tinygo-org/drivers/pull/550
This changes the signature of `SetRotation` but I don't think any
existing code will be affected by this change.