2015-11-02 52 views
1

我想捕捉所有的筆數據:觸摸,壓力在一個點,觸摸的座標...Java:如何在Wacom STU-530 Tablet中捕獲筆數據?

有什麼建議嗎?

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

我設法解決使用wgssStu庫的問題,這個罐子有PenData類,它有以下方法:getPressure,信息getX,的getY,getRdy,getSw ...