A few minor changes like passing in a filename and fixing the different
spellings of the orientations.
In order to use it from kete though we have to mess with the PYTHONPATH. But
since it's a in-tree tool only anyway... meh.
This loses the ability to disable pressure on tablets. I think that's just a
leftover from before we knew how to handle pressure in SVG exports. We should
just fix that properly instead of having a config option here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Make sure our dimensions are in actual µm.
Note that this will mess with any cached JSON files since they are now on a
different scale.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
gresources and svgwrite don't (yet?) take a Path though, so we have to use
os.fspath() to convert those.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This requires adjusting the svg conversion in kete as well, afaict the 1000
range there was chosen because it's (almost) the midpoint of the Bamboo series
with 2048 pressure grades. So let's use half of 0x10000 instead, which is
approximately 0x8000 as the crow flies.
Fixes#142
Propagated whenever we start talking to the device (and then again when we
stop). The purpose of this signal is merely that a UI can show e.g. a progress
bar while we're talking to the device to ensure the user something is
happening.
Fixes#138
>$ flake8 --ignore=E501,W504 tools
tools/kete.py:35:1: E302 expected 2 blank lines, found 1
tools/kete.py:553:12: E713 test for membership should be 'not in'
tools/kete.py:599:42: E226 missing whitespace around arithmetic operator
tools/kete.py:599:61: E226 missing whitespace around arithmetic operator
tools/kete.py:615:25: E226 missing whitespace around arithmetic operator
tools/kete.py:615:32: E226 missing whitespace around arithmetic operator
tools/kete.py:624:49: E225 missing whitespace around operator
tools/kete.py:871:9: F841 local variable 'e' is assigned to but never used
This is a first implementation of variable stroke pressure. It is based
on a set of individual-width-variable strokes. The ideal implementation
should convert the variable-stroke-width path into an outlined shape.
Export the supported versions in a Manager property and require the client to
request a specific version in GetJSONData. Without that, the server could
never update the format and clients would have to support every single
historical version to make sure they can run against any version server.
Fixes#98
Because we're totally going to ship tuhi in embedded devices that are going to
be in use until after 2038 when time resets to zero, the world goes big bang
and the only survivers will be 64-bit species. Or something like that. Either
way, the API documentation already said so anyway and the DrawingsAvailable
property is already 64 bit too.
Semi-confusingly: the dbus 64 bit unsigned type is 't', it doesn't stand for
'timestamp'.
Python doesn't really like minus signs in file names, especially
when you start importing the modules. Rename kete from tuhi-kete.py
to kete.py so it makes it easier to have other scripts in the tools
folder to borrow code from kete.