The Onyx Docs appear out of date, however, some docs are still valid and even where docs are incorrect, they still give us a use-philosophy which helps point in the right direction in some cases.
https://github.com/onyx-intl/OnyxAndroidDemo/tree/master/doc
At least skim, it's important to have some registry in your brain of facilities that exist so that we don't unnecessarily reinvent any wheels. https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/EPD-Screen-Update.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/EPD-Update-Mode.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/EPD-Touch.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/EpdDeviceManager.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/Onyx-Pen-SDK.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/Scribble-API.md https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/Scribble-TouchHelper-API.md
TLDR; Digest
- NOTE: "Touch" refers to pen or finger input within the drawing region
- EpdController - Set Update Mode, can improve perf
- EpdController - Can Enable/Disable touch to all, or to select regions
- EpdDeviceManager - Set full/partial screen update intervals
- EpdDeviceManager - Can Enable/Disable enter/exit animation
https://github.com/onyx-intl/OnyxAndroidDemo/blob/master/doc/AppOpenGuide.md
I am not an Onyx expert.
Onyx Documentation is minimal and it appears the source is obfuscated.
Wee!
Check out AtOnyx.kt for src.
It seems that Onyx automagically takes care of writing pen stokes to the surface's canvas's bitmap. Our job is to record these strokes so that they can be later restored for various cases. This is done by reapplying the recorded pen strokes to a local bitmap via a canvas backed by that bitmap, then queueing a job for Onyx to write the bitmap to the surface's canvas's bitmap. A little like double-buffering but more silly.
- Look at EpdController update mode, this may improve performance for note taking
When we clear/refresh/eraseall/etc we must disablePen() then enablePen() but what if the user had the pen disabled? now suddenly it is enabled.
REPRO:
- Draw A
- Clear All
- Refresh
- Draw B
- Clear All OBSERV:
- B erased first, then A.
Not sure why. For now I changed to a checkbox.
- draw zero
- pressure off
- observe: blank
- draw one
- pressure on
- observe: blank
- refresh
- 0 & 1