/Anki-StylusDraw

Pressure Drawing functionality for Anki

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Anki-StylusDraw

Initially based on the Anki-TouchScreen addon, updated ui and added pressure pen/stylus capabilities, perfect freehand(line smoothing) and calligrapher functionality.

Website to test the drawing functionality: https://rytisgit.github.io/Anki-StylusDraw/

Draw Demonstration

Changes

  • Updated UI, add option to convert dots, hide cursor and ui while drawing. Thanks rin-w
  • Added Perfect Freehand mode(https://github.com/steveruizok/perfect-freehand)
  • Added Calligrapher mode(https://github.com/atomanyih/Calligrapher)
  • Added pressure sensitivity
  • Increased drawing speed
  • Added , for showing/hiding, . for clearing, alt + c for calligrapher mode and alt + x for perfect freehand mode
  • Added standalone website to test drawing
  • Work around a Windows Pen bug which makes 2 primary pointers appear when drawing in Anki

Hardware

Tested to work with a Huion H1161, Windows Pen enabled.

For best exprience dont use software rendering and turn on use pen as a mouse

Dont use software rendering in Anki settings Check use pen as mouse in Windows pen settings

Old Description

Implements same drawing/writing mechanism as in AnkiDroid. Your writing is NOT intended to remain on the cards after review - same as in AnkiDroid.

Use the menu ViewTouchScreen to activate/change settings.

Use Ctrl + R to toggle the touchscreen.

Use icons which will show up in the top right corner of the review screen to temporarily hide/clean the board. Enjoy!

Warning: the version for Anki 2.0 has limited functionality, and may sometimes not work as expected; since the release of Anki 2.1, the old version is not supported.

Changelog:

  • 0.2.6 - make "undo" action available under Alt + Z
  • 0.2.4 - add support for enhanced image occlusion, add a fix for "a double click bug" by LaucianK
  • 0.2.3 - bug fix release, improvements to undo button, styling and performance
  • 0.2.1 - minor fix for the buttons/canvas positioning
  • 0.2 - added "undo" option, improved the support of long cards plus other minor improvements

Disclaimer

Important parts of Javascript code were inspired by creativejs tutorial. I recommend you check out the resource if you are interested in learning JS.

This add-on works well with Anki Night Mode.

For developers

You are more than welcome to contribute! While I may not be able to support every user of this addon, I will do my best to help any developer willing to open PR implementing new features or fixing bugs.