So I actually did it the whole way and am enjoying large colored hardware cursors here :) Works even with huge cursors filling the whole screen - any 32 bit form could be cursor, at least under X11 with the Xrender extension.
I'm attaching my files:
* bigCursor-bf changeset for VMMaker which extends the beCursor primitive. Support code needs to implement ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY)
* biggerCursor-bf changeset is a quick hack to enlarge the normal cursors by two, enable #biggerCursors to test (safe on older VMs, too)
* argbCursors.diff patch for platforms/unix relative to SVN trunk. You have to run "make" in platforms/unix/config yourself, the generated configure and aclocal are not in the patch.
The test code below works for me, too. Would be cool to get support for this into the other VMs :)
- Bert -
On Mar 20, 2007, at 18:48 , Bert Freudenberg wrote:
Hi Ian,
I implemented ioSetCursorARGB() on X11 using the XRender extension, see attachment. It's a stand-alone test program that uses ioSetCursorARGB() to show a nicely colored cursor. This is not hooked up to the new primitive yet - can you do this soonish or should I work on a more complete patch?
- Bert -
On Mar 4, 2007, at 16:54 , Bert Freudenberg wrote:
On Mar 4, 2007, at 13:18 , Bert Freudenberg wrote: | source scale colors form cursor | source := Cursor read. scale := 3. colors := {Color blue alpha: 0.5. Color green alpha: 0.25}. form := source asCursorForm as8BitColorForm. form replaceColor: Color black with: colors first. form replaceColor: Color white with: colors second. form := form asFormOfDepth: 32. form := form magnify: (source innerPixelRectFor: 0 orNot: false) by: scale. "form asMorph openInHand." cursor := Cursor extent: form extent depth: 32. form displayOn: cursor at: 0@0 rule: Form blend. "pre-multiply alpha" cursor offset: (source offset - 0.5 * scale min: 0@0 max: cursor extent negated) asIntegerPoint. cursor show
For testing the offset, "Cursor crossHair" might work best.