Cursor (was: Agenda, 19 June 2014 SVG WG telcon)

Hello Erik,

Wednesday, June 18, 2014, 2:38:12 PM, you wrote:

> * Describe <cursor> in terms of cursor property, similar as HTML does for
> <font>? (krit)

> * What does x and y do for <cursor>? (krit)

That is a puzzling pair of agenda items. Perhaps some explanation will

In 1998 when SVG was starting, CSS2 had a cursor property
which allowed custom cursors. However, in practice, this was poorly
implemented because cursor formats were platform specific and there
was no easy way to do fallback for multiple formats.

SVG adopted the cursor property, unchanged, but improved
interoperability by allowing standard image formats (like PNG) to be
used. Even in the 1998-2000 timeframe, .png was better supported than
.cur or whatever.

However, one difference between an ordinary image format and a cursor
format is that a cursor also defines the coordinates of the hotspot
(the place where the cursor points). As an example, a cursor shape
which is an arrow pointing to the upper left would have the hotspot in
the upper left at the point of the arrow. A cursor which is like a
crosshair would have the hotspot in the middle of the crosshairs.

Thus, rather than pointing to the image file directly, SVG introduced
a cursor element with two attributes, x and y, which are the hotspot
coordinates and a third attribute to point to the actual image.

So you could make a cursor from a PNG (or indeed from an SVG).

(All of that is explained by the first two paragraphs of 16.8.3 The
'cursor' element, but maybe the above explanation helps).

Thus, to answer the two agenda items:

* Describe <cursor> in terms of cursor property
It already *is* defined in terms of the cursor property. Specifically,
it gives the URI part of the cursor property something to point to in
a cross-platform manner

* What does x and y do for <cursor>?
Defines the hotspot, for formats that don't have one.

The spec text could do with an example or two, should say that it is
world coordinates that are used if the cursor element points to an SVG
fragment, and should also say what happens when the image pointed to
*does* have a hotspot (which one wins?).

Best regards,

Received on Wednesday, 18 June 2014 14:29:18 UTC