[Vm-dev] Bigger cursors needed

Bert Freudenberg bert at freudenbergs.de
Wed Mar 21 18:38:45 UTC 2007


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 at 0 rule: Form blend. "pre-multiply alpha"
>> cursor offset: (source offset - 0.5 * scale min: 0 at 0 max: cursor  
>> extent negated) asIntegerPoint.
>> cursor show
>>
>> For testing the offset, "Cursor crossHair" might work best.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: bigCursor-bf.1.cs.gz
Type: application/x-gzip
Size: 1150 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20070321/e2a35bfa/bigCursor-bf.1.cs.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: argbCursors.diff.gz
Type: application/x-gzip
Size: 2967 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20070321/e2a35bfa/argbCursors.diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: biggerCursors-bf.1.cs.gz
Type: application/x-gzip
Size: 687 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20070321/e2a35bfa/biggerCursors-bf.1.cs.bin
-------------- next part --------------




More information about the Vm-dev mailing list