Re: Cursor/pointer image?

Walter Ian Kaye wrote:
> 
> Hummm... for <uri>, is there a x-platform spec for the cursor data format?

Probably, but I don't know what it is and I am in NT at the moment so I
don't want to reboot to find out.

> On MacOS, a cursor is 16x16 with one of the pixels a "hot spot" -- I don't
> know what cursor sizes are on different platforms, 

16x16 and 32x32 are common

> or what image formats
> support indication of the hot spot (does PNG??).

No it doesn't, although it is extensible and this would be a trivial new
PNG chunk to add. I have thought about proposing it a couple of times.
Other folks have suggested though that existing image authoring apps
would not support it. But I am sure that existing *cursor* apps would
support it soon enough, and it would be nice to have a cross-platform
solution.

Certainly, the platform-specific cursor formats are bothersome.

For SVG, which can use the cursor property, we defined a cursor element
[1] which has attributes to hold the x and y values of the hotspot, and
which is an xlink so it points to a PNG file which is used as the
platform-independent cursor.

So the usage in SVG is is

yourselectorhere { cursor: url(myfile.svg#mycursor) }

and in the svg file you have

<cursor id="mycursor" x="5" y="12" xlink:href="my.png">

Since SVG implementations are required to support JPEG and PNG formats,
that ensures that all compliant implementations can use the image that
was pointed to, and they can read the coordinates of the hotspot, too.


[1] http://www.w3.org/TR/SVG/interact.html#CursorElement

--
Chris

Received on Thursday, 2 December 1999 14:35:29 UTC