HTML Link sensing

I'm a good bit of the way through writing an HTML browser for my system which displays on a 10.4" 640x480 screen and accepts input via a touchscreen of the same size.

I'd be interested in hearing the group's ideas on how to mark hyperlinks as such. The parser knows where on the screen links are defined and the touchscreen drivers reports the pixel touched so there is no problem (theoretically) in linking the two points.

One approach I'd thought of was to have a huge array with an element per pixel and mark hyperlinks in the array as they are drawn. The touch handler can then look straight at the array and see if there is a link to be processed. I have the luxury of not being hugely constrained by memory size but this method does seem to be very wasteful as most of the array will normally be empty.

A refinement would be to define 5x5 or 10x10 blocks of pixels to reduce the size of the array but there then becomes the possibility (through poor authoring mainly) of two links sharing the same block.

There must be a cleverer way of doing this. Any thought?

Reply to
Tom Lucas
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.