I ended up drawing my custom cursor on top, after getting the raw
image from java.awt.Robot. However this truly was a custom cursor,
since I was also unable to acquire the raw pixels of the
java.awt.Cursor. Reading the source code for java.awt.Cursor, it's
obviously there buried under resources in rt.jar.

Camtasia Studio appears to also draw it's own, as does VNC clients
(for obvious compression reasons).

However it would be nice with a Robot.createScreenCapture(Rectangle
screenRect, boolean includeCursor);

/Casper

On Jun 3, 10:10 pm, Fabrizio Giudici <[email protected]>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 6/3/10 21:45 , Robert Casto wrote:
>
> > If I remember correctly, visual cursor position is implemented in
> > hardware. Software changes the cursor to use and the graphics
> > hardware takes care of all the heavy lifting. This frees up the
> > CPU and it leaves the screen in tact so it doesn't have to be
> > redrawn when the cursor is moved. I guess not being able to capture
> > it is the side affect. Perhaps screen capture software can detect
> > which cursor image is being used? I don't think the hardware was
> > setup to return the cursor image though.
>
> Now I get the core point by Tor, that is not only to draw any sort of
> cursor, but precisely the current one.
>
> I got curious and tried SnapZ Pro X to capture a portion of the screen
> where the cursor was over a text box, so it got the specific caret
> shape. It worked. I'm not sure this is a proper test, as the
> application could just draw the cursor on its own and detect when it's
> over a textbox. What kind of test could be done to actually understand
> what's happening? I suppose I need an application that renders a
> custom cursor. I tried Omnigraffle that uses a cross-shaped cursor -
> it is properly captured. Anything else to try?
>
> - --
> Fabrizio Giudici - Java Architect, Project Manager
> Tidalwave s.a.s. - "We make Java work. Everywhere."
> java.net/blog/fabriziogiudici -www.tidalwave.it/people
> [email protected]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkwIDC4ACgkQeDweFqgUGxcBJgCdGQDif1+WYEvAfQsXvOp/fb/r
> S+gAn2O4gAaJayZZT1ACm+e6PkRQacnL
> =JhSb
> -----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to