View Full Version : Javascript and PHP - Drawing Lines
x_goose_x
07-31-2002, 04: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
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, 05: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, 10:46 AM
You can also draw anti-aliased lines using VML, which is natively supported in IE5+
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, 08: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.
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.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.