Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Graphics table pressure sensitivity

    Hi guys,

    I've done a search on this here, and it's come up blank. The internet doesn't seem to bu me much either!

    Is there a way to "monitor" the amount of pressure a graphics tablet pen is applying? Seems straightforward enough to me, but there's nothing I can spot in the API that suggests I can do this.

    I've had a look at some API's, but they're all from at least 5 years ago, and I'm loathe to bat about anything pre Java 1.5 as I could do with some stability.

    Assistance gladly received :-)

    - Richard

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default Re: Graphics table pressure sensitivity

    JPen?
    There's an example on there that seems to deal with pressure.
    Java Code:
    ...
        float pressure=ev.pen.getLevelValue(PLevel.Type.PRESSURE);
        brushSize = pressure * 10;
        opacity = pressure * 255;
    ...
    Does that sound about right?
    It's Java 5 as well...

  3. #3
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Re: Graphics table pressure sensitivity

    You the man!

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default Re: Graphics table pressure sensitivity

    It wasn't the easiest Google.
    Had to go via some other product to then see what underlying package they were using.

    Hope it works!

Similar Threads

  1. How to use Contains - without case sensitivity?
    By Russell411 in forum New To Java
    Replies: 12
    Last Post: 11-07-2012, 02:53 PM
  2. Replies: 1
    Last Post: 09-27-2011, 06:06 AM
  3. Drawing a graphics onto another Graphics ?
    By Ziden in forum Java Applets
    Replies: 0
    Last Post: 01-08-2011, 07:30 PM
  4. Replies: 1
    Last Post: 01-08-2010, 06:19 AM
  5. Help with 2d graphics please
    By xbox_nutter in forum New To Java
    Replies: 0
    Last Post: 04-02-2009, 11:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •