Commit Graph

12 Commits (bb13c4c7892c5b3ea2ddf1875639bcbb43e9b253)

Author SHA1 Message Date
Michael Hanselmann ecc1eed386 waveshare213v2: Add support for partial drawing
When the destination rectangle didn't start at (0,0) or cover the whole
display the Dev.Draw function would continue to update the display in
full. Obviously that didn't result in a good output.

This change updates the drawing logic to only update the affected area
(aligned to whole bytes on the horizontal axis) and limits the amount of
transferred data to the minimum needed to cover the destination
rectangle.

The calculation of the various offsets as well as the function sending
the image data are written to support unittesting.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Marc-Antoine Ruel 9b7814b7f9 Update dependencies 4 years ago
hansmi d09d487465
Remove dependencies on fogleman/gg and golang/freetype (#28)
The waveshare2in13v2 example was evidently copied from the epd example,
but didn't comment out the code pulling in additional dependencies.
5 years ago
Marc-Antoine Ruel 47f3fec45d go.mod: update dependencies 5 years ago
Marc-Antoine Ruel 0b81efc55a Roll dependencies 5 years ago
Marc-Antoine Ruel 94908ff801 screen1d: import from periph/extra
Tweak it a bit to expose the palette as an option.
Uses the same license.
This is the first commit that causes a dependency on golang.org/x/sys.
5 years ago
Dan Kortschak 960e8d343b
waveshare2in13v2: add example (#8) 5 years ago
Marc-Antoine Ruel 2dc230abd8 go.mod: update for v3.6.7 5 years ago
Marc-Antoine Ruel 402bbcc930 Migrate to devices/v3
Ran:
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/conn#periph.io/x/conn/v3#g'
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/host#periph.io/x/host/v3#g'
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/devices#periph.io/x/devices/v3#g'
  go test ./...
  go mod tidy
5 years ago
Marc-Antoine Ruel 50dea9a963 go.mod: update host with fixes 5 years ago
Marc-Antoine Ruel af14a1f7d2 go.mod: update conn and host for driverreg 5 years ago
Marc-Antoine Ruel 655d1cef69 Update import path to what devices will be
Also update imports to conn and host.

Ran (roughly):
  # Update the references.
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/conn#x/conn#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/conn#x/conn#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/host#x/host#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/host#x/host#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/devices#x/devices#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/devices#x/devices#g'

  # Initialize the go module:
  go mod init periph.io/x/devices

  # Edited it to require go 1.13:
  vi go.mod

  # Reorder imports.
  goimports -w .
5 years ago