JRS: In article <cq************ *******@news.de mon.co.uk>, dated Tue, 21
Dec 2004 23:26:03, seen in news:comp.lang. javascript, Richard Cornford
<Ri*****@litote s.demon.co.uk> posted :
So you are probably talking about an HTML UA context, where drawing
polly shapes may be a matter of creating and positioning hundreds
(potentially thousands) of CSS positioned DIV elements. That can be done
but don't expect the results to be quick (or the required code to be
small and simple).
Let there be created, preferably in the public domain, images of
squares. Let there be sets of squares, of side 16 32 64 128 256 pixels.
Let each set consist of the 256 squares with all combinations of "radii"
on and off. Let a radius be a 1px-wide black line from the centre to a
corner or side mid-point of a white square.
Name them with computable names including the size and a binary encoding
of the radii used.
ISTM that quite a lot of diagramming could be done by filling a
borderless, etc., Table with such images. A preliminary test indicates
so, except that it might be better to use sides of 2^n+1 or 2^n-1, to
help diagonals. have the same visual weight as other lines.
Those figures would tend to get cached. Special figures could be used
for particular parts of diagrams. When the diagram was hand-coded,
colspan rowspan and image height/width control might help.
It would not be the equivalent of proper graphics, but it should compete
with ASCII art for line diagrams. It could be output by program from a
diagram in some other form.
--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelig ht.net/minitrue/> Update hope?