[Vm-dev] Bigger cursors needed

Bert Freudenberg bert at freudenbergs.de
Sun Mar 4 12:18:52 UTC 2007

On Mar 3, 2007, at 22:31 , John M McIntosh wrote:

> 10.2 has a restriction of 16x16, but that is lifted in 10.3
> I'll need to convert to the new NSCursor model. so will do that  
> soon in  3.8.16 mac carbon vm.
> If you can point to a image that enables the large cursor  
> functionality so I can do testing that would be good.

Well, I can't test it without a real implementation. But this should  
work if the primitive works:

| form cursor |
form := Cursor normal asCursorForm as8BitColorForm.
form replaceColor: Color white with: (Color green alpha: 0.25).
form replaceColor: Color black with: (Color blue alpha: 0.5).
form := form asFormOfDepth: 32.
form := form magnify: (0 at 0 extent: 9 at 16) by: 3.
cursor := Cursor extent: form extent depth: 32.
form displayOn: cursor at: 0 at 0 rule: Form blend. "pre-multiply alpha"
form asMorph openInHand.
cursor show

The cursor rendering should match the morph (provided your world is  
set to 32 bpp). In particular, the green border should not appear  
grayish, if it is, your system does not use pre-multiplied alpha. We  
can still change the spec if this is the case.

- Bert -

More information about the Vm-dev mailing list