...

Javascript and PHP - Drawing Lines

x_goose_x
07-31-2002, 03:31 AM
An interesting way of drawing a line interactively without the need for any plug-ins.

http://www.smokinggun.com/demos/line_draw.php

jkd
07-31-2002, 03:52 AM
That is pretty neat. :)

I suppose there's no way to antialias the lines since I assume you're using PHP to generate a transparent image with an appropriate black line through it?

BTW, through the use of the SVG namespace, you can draw anti-aliased lines in SVG-enabled builds of Mozilla and Amaya without a plugin. :)

x_goose_x
07-31-2002, 04:35 AM
I didn't mean to give the wrong impression, this is not my script. I couldn't tell you the slightest thing about php. I just thought it deserved a look.

brothercake
07-31-2002, 09:46 AM
You can also draw anti-aliased lines using VML, which is natively supported in IE5+

jkd
07-31-2002, 06:11 PM
Originally posted by brothercake
You can also draw anti-aliased lines using VML, which is natively supported in IE5+

And not supported anywhere else, whereas an excellent plugin exists for SVG for IE and NS4. Which is why I promote SVG over VML (not just because the fact it is in 1.1 W3C Recommendation)

brothercake
07-31-2002, 07:08 PM
Indeed ... so surely the best solution is to support both - sniff for vector support and then you get VML for the 80% of internet users whose browser natively supports it, and SVG for those who have the right plug-in, or can be prompted to download it. I would always avoid using a technology that relies on a plug-in wherever possible.

jkd
07-31-2002, 07:25 PM
Originally posted by brothercake
I would always avoid using a technology that relies on a plug-in wherever possible.

When I was on Win98, IE6 did not come with VML support, and always prompted me to download a multi-megabyte extension to support it. I avoid those things even more than plugins.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum