473,804 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drawing commands?

Hi all,

I heard or read that the next version of HTML will provide
long-overdue drawing commands.

Which version of Firefox, Opera or IE supports such
new fancy stuff?

Thanks!

Aug 9 '06 #1
7 2180


Pontifex wrote:

I heard or read that the next version of HTML will provide
long-overdue drawing commands.
HTML has commands?
Which version of Firefox, Opera or IE supports such
new fancy stuff?
Opera 8 has some support for rendering SVG (scalable vector graphics),
an XML application.
Opera 9 has much better support for SVG and also allows scripting SVG
documents (so if you have questions about that you could ask here).
Firefox 1.5 also has some support for rendering SVG and scripting SVG
documents (<http://developer.mozil la.org/en/docs/SVG_in_Firefox> ).

Then Safari some time ago introduced the canvas element to expose a
drawing API for that canvas to script
<http://developer.mozil la.org/en/docs/Canvas_tutorial >.
By now Safari, Firefox 1.5, and Opera 9 support canvas and and a two
dimensional drawing context, one attempt to standardize the API is here
<http://whatwg.org/specs/web-apps/current-work/#scs-dynamic>
although neither Firefox 1.5 nor Opera 9 implement all methods specified
there.

IE natively has neither support for SVG nor for canvas. IE however has
support for VML (vector markup language), sort of a predecessor to the
W3C SVG standard. There are attempts for instance to emulate canvas for
IE with the help of script, behaviours and VML.
And for SVG there is the Adobe SVG viewer 3.0 as an active x
control/plugin which with IE allows rendering and scripting SVG.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 9 '06 #2

Martin Honnen wrote:
Opera 8 has some support for rendering SVG (scalable vector graphics),
an XML application.
What's frustrating is that if Firefox allowed changing
table cell background color, which I've discovered it doesn't,
it would be possible to create a raster image using
a table. It works in Opera, I've noticed.

Aug 9 '06 #3


Pontifex wrote:

What's frustrating is that if Firefox allowed changing
table cell background color, which I've discovered it doesn't,
it would be possible to create a raster image using
a table. It works in Opera, I've noticed.
Why would Firefox not allow you to do e.g.
cellElementObje ct.style.backgr oundColor = 'lightblue'
? That is DOM Level 2 Style/CSS and supported.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 9 '06 #4

Martin Honnen wrote:
Why would Firefox not allow you to do e.g.
cellElementObje ct.style.backgr oundColor = 'lightblue'
? That is DOM Level 2 Style/CSS and supported.
Good question. But Firefox's error log says I'm
trying to set the value of something that only has
a read/get function. You can try it yourself,
like so:

<table id=fubar><tr><t d bgcolor=black width=10 height=10></table>

<script>
fubar.rows[0].cells[0].style="backgro und:blue;"
</script>

This works in Opera 9.
This does not work in Firefox 1.5.0.2.
This does not work in IE 6.0.2900

Aug 9 '06 #5

Pontifex wrote:
This works in Opera 9.
This does not work in Firefox 1.5.0.2.
This does not work in IE 6.0.2900
An update:

This work with Firefox, but not with IE or Opera.

<script>
fubar.rows[0].cells[0].style.backgrou nd="blue;"
</script>

Aug 9 '06 #6
Pontifex wrote:
Martin Honnen wrote:
>Why would Firefox not allow you to do e.g.
cellElementObje ct.style.backgr oundColor = 'lightblue'
? That is DOM Level 2 Style/CSS and supported.

Good question. But Firefox's error log says I'm
trying to set the value of something that only has
a read/get function. You can try it yourself,
like so:

<table id=fubar><tr><t d bgcolor=black width=10 height=10></table>

<script>
fubar.rows[0].cells[0].style="backgro und:blue;"
</script>

This works in Opera 9.
This does not work in Firefox 1.5.0.2.
This does not work in IE 6.0.2900
This works in FF and IE:

var el = document.getEle mentById("fubar ");
el.rows[0].cells[0].style.backgrou nd = "blue";
<table id="fubar">
<tr>
<td style="backgrou nd:black; width:10px; height:10px;"></td>
</tr>
</table>
Andrew Poulos
Aug 9 '06 #7


Pontifex wrote:
Martin Honnen wrote:

>>Why would Firefox not allow you to do e.g.
cellElementObje ct.style.backgr oundColor = 'lightblue'
? That is DOM Level 2 Style/CSS and supported.
<table id=fubar><tr><t d bgcolor=black width=10 height=10></table>

<script>
fubar.rows[0].cells[0].style="backgro und:blue;"
That is not what I suggested, use
document.getEle mentById('fubar ').style.backgr oundColor = 'blue';
and I am sure IE, Opera, Mozilla, Netscape will be happy.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
13013
by: Remon Huijts | last post by:
Hi there, For a very specific service, I have created a PHP script that uses the GD library functions to create a PNG image from a few lines of XML data describing a simple diagram/drawing. It's cool and works, writing the XML data in a text editor is straightforward for me because I designed the format. I have no idea however how I can make a simple online drawing program that creates this XML code. The code is realy simple, just...
5
5366
by: Chris | last post by:
I want a program that can "draw" sound. Imagine drawing a graph of frequency against time - and then being able to play it over the computer speakers. Can this be done in Python? As a start, consider this simple QBASIC program that generates random frequencies:
2
12347
by: Champika Nirosh | last post by:
Hi, I want to create drawing board application that can draw Line, rectagle, circle and free hand drawing. Each drawing need to be transparent, moveable (draggable), have bring to front and send to back feature etc. How can I do this .. where should I start?
1
1799
by: Juan Romero | last post by:
Guys, I am working on an "Image Editor" application. Is it possible to draw different layers using the GDI? I have no experience whatsoever with graphics which is why I have decided to embrace this project, hoping it will help me learn "imaging". If anyone can point me in the right direction I would appreciate it a lot. Any tutorials, links, etc welcomed.
3
3921
by: Mad Scientist Jr | last post by:
I am looking to make a homegrown vector drawing tool, similar to making vector drawings in Word or Powerpoint. It should be easy to use and intuitive, like Word or the old MacDraw. I want to make it easy for beginners, as opposed to something harder or more involved like Illustrator or Flash... It would support shapes like * rectangle * oval * rounded rectangle
5
3378
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However, when I did this I got the following error: 'System.Drawing.Image.Image()' is inaccessible due to its protection level Looking at other online examples, I found that the proper way to use it is like this:
6
4058
by: Peted | last post by:
Hi wondering what is the best way to do this Need a user to click a button, that sends 3 or 4 string based commands via a TCP/ip socket link I can connect to the ip device no problems, am using indy sockets, and can send information ok
11
9314
by: cty0000 | last post by:
I have some quiestion... I want to draw line,point,rectangles and etc... on the from So I code like this.. public update() { g = this.CreateGraphics(); g.FillRectangle(Brushes.White, x1, y1, x2, y2); }
2
2332
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no response object but how do I write it to screen? Dim objBitmap As New System.Drawing.Bitmap(400, 440) Dim objGraphics As System.Drawing.Graphics objGraphics = System.Drawing.Graphics.FromImage(objBitmap) objGraphics.Clear(Drawing.Color.White)
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10603
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.