Java:如何在Wacom STU-530平板电脑中捕获笔数据?

时间:2015-11-02 18:30:17

标签: java wacom

我正在尝试捕获所有笔数据:触摸,一点压力,触摸坐标......

有什么建议吗?

SigCtl sigCtl = new SigCtl();
DynamicCapture dc = new DynamicCapture();
int rc = dc.capture(sigCtl, "who", "why", null, null);
if(rc == 0) {
    System.out.println("signature captured successfully");
    String fileName = "sig1.png";
    SigObj sig = sigCtl.signature();
    sig.extraData("AdditionalData", "CaptureImage.java Additional Data");

    int flags = SigObj.outputFilename | SigObj.color32BPP | SigObj.encodeData;
    sig.renderBitmap(fileName, 200, 150, "image/png", 0.5f, 0xff0000, 0xffffff, 0.0f, 0.0f, flags );
}

1 个答案:

答案 0 :(得分:1)

我设法使用wgssStu库来解决问题,这个jar有PenData类,它有以下方法:getPressure,getX,getY,getRdy,getSw ......