gpt4 book ai didi

Python Wacom 界面

转载 作者:太空宇宙 更新时间:2023-11-04 06:29:16 28 4
gpt4 key购买 nike

我正在尝试在 Windows 7 上编写一个 python 脚本来与我的 Wacom Bamboo Pen 数位板交互。 Wacom 建议使用 WinTab API,它工作正常,但不适用于我的应用程序。我不希望 Wacom 数位板充当定点设备(例如,它不应该移动光标)。我只需要来自设备的原始 x、y 数据。

实现它的最佳方法是什么?我是否必须为平板电脑编写不同的驱动程序才能允许这样做?或者我可以修改现有的 Wacom 驱动程序以不影响系统光标。

最佳答案

我想,在 wintab 中你可以获得原始坐标。至少在 Python wrapper for wintab你可以访问它们:

cgkit.wintab.Packet.x

In absolute mode, contains the scaled cursor location along the x axis. In relative mode, contains the scaled change in cursor position.

cgkit.wintab.Packet.y

In absolute mode, contains the scaled cursor location along the y axis. In relative mode, contains the scaled change in cursor position.

我是 investigating对我自己来说,如果有一个跨平台的平板电脑 api,但如果你需要应该工作的仅限 Windows 的解决方案。

关于Python Wacom 界面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4848694/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com