473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

JavaScript / For painting or drawing - anything out there like this?

hi, is there a pure javascript code (no Java applets), for painting or
drawing using a e-pencil or something, in a defined space on the
screen? best regards-(:JB:)

Jun 11 '06 #1
9 3724

ju**********@gmail.com wrote:
hi, is there a pure javascript code (no Java applets), for painting or
drawing using a e-pencil or something, in a defined space on the
screen? best regards-(:JB:)


I do not know exactly what you want to draw or paint, but script seems
to be a difficult method to do this if you want to do anything very
complicated. A good graphics program such as PaintShop is likely to be
far easier to use for this sort of thing. You can generate simple
images such as some geometric figures using the math functions of
javascript, but this requires that you know a little analytical
geometry as well as how to use the script math functions to do this.
Using script to move images around that you already have (dhtml) is
often not too difficult if you can write your own script. There also
are some programs that will allow you to draw things using the cursor
and screen. My Windows XP includes a little Microsoft program to do
that.

Jun 11 '06 #2
Hi,

ju**********@gmail.com wrote:
hi, is there a pure javascript code (no Java applets), for painting or
drawing using a e-pencil or something, in a defined space on the
screen? best regards-(:JB:)


JavaScript is not good at graphics. On the Web, a possible alternative
is SVG which can be scripted, thus allowing including new graphical
elements. However, SVG is likely to disappear soon (oh the controversy
,-) because of its very poor support by Adobe, and by the coming-soon of
WPF/E (CTP this July, release this winter) by Microsoft.

WPF/E is a very powerful graphics engine which will run in IE6, IE7,
Firefox, Opera on Windows, Safari on Macintosh, and later on Linux OSs.
WPF/E will support C# business logic and will also be scriptable. Very
exciting stuff really.

See Mike Harsh's blog for details.
http://blogs.msdn.com/mharsh

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 11 '06 #3

cwdjrxyz wrote:
There also
are some programs that will allow you to draw things using the cursor
and screen. My Windows XP includes a little Microsoft program to do
that.


If you have or can use a computer with the Microsoft XP operating
system, go to Start, select Accessories, and then select Paint. This is
the program I had in mind, and it came installed on my computer. I have
not used it, because PaintShop that I have handles image work that I
need much better for me. I do not know the details of how this program
is written, but it most likely uses some higher level computer
languages such as C++, Java, etc as javascript often is too limited for
elaborate programs designed to be run on a PC.

Jun 11 '06 #4
Hi,

cwdjrxyz wrote:
If you have or can use a computer with the Microsoft XP operating
system, go to Start, select Accessories, and then select Paint.
I got to say, I fail to see how that will help the OP... Paint can
obviously not be embedded in a web page (don't start talking about
ActiveX please ;-) and is probably not what the OP had in mind.

This is the program I had in mind, and it came installed on my computer. I have
not used it, because PaintShop that I have handles image work that I
need much better for me. I do not know the details of how this program
is written, but it most likely uses some higher level computer
languages such as C++, Java, etc as javascript often is too limited for
elaborate programs designed to be run on a PC.


A programming language is only as limited as the programer's knowledge
;-) or as the framework it runs on. Using JScript.NET, for example, you
can do exactly the same as you would in C#, because the .NET framework
exposes all the objects to JScript.NET. In the case of the web browser,
the JavaScript framework doesn't allow painting on the screen, which is
why it would be awkward to use JavaScript as a graphical framework in
the web browser.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 11 '06 #5

Laurent Bugnion wrote:
Hi,

cwdjrxyz wrote:
If you have or can use a computer with the Microsoft XP operating
system, go to Start, select Accessories, and then select Paint.


I got to say, I fail to see how that will help the OP... Paint can
obviously not be embedded in a web page (don't start talking about
ActiveX please ;-) and is probably not what the OP had in mind.


The OP did not specify if he or she wanted something that would work
online for someone viewing a web page or if something was wanted that
will allow drawing and painting while on the computer and offline. Just
because one has a PC does not imply that it is used mainly on the web,
or at all. Many PCs are never connected to the web. So unless one of us
knows the OP, or has received an email, we can only guess what is
wanted. We both have mentioned a few things that might work off and/or
on the web. If the OP finds any of these leads interesting, a more
detailed post might allow a more focused response. From the tone of the
OP post and their profile, I am guessing that something rather simple
and readymade is desired, but I am only guessing and could be very
wrong.

Jun 11 '06 #6

cwdjrxyz wrote:
cwdjrxyz wrote:
There also
are some programs that will allow you to draw things using the cursor
and screen. My Windows XP includes a little Microsoft program to do
that.


If you have or can use a computer with the Microsoft XP operating
system, go to Start, select Accessories, and then select Paint. This is
the program I had in mind, and it came installed on my computer. I have
not used it, because PaintShop that I have handles image work that I
need much better for me. I do not know the details of how this program
is written, but it most likely uses some higher level computer
languages such as C++, Java, etc as javascript often is too limited for
elaborate programs designed to be run on a PC.


There is a free image program at
http://www.imagemagick.org/script/index.php that you can download that
allows you to process images in many ways as well as paint and draw on
your computer. In addition, there have been online versions of this
program that you can use without downloading the program. These often
were used by WebTV users who cannot download anything. You can find and
introduction and link to an online version at
http://members.tripod.com/~ImageMagick/ . If you have the right host
you could even put ImageMagick, or portions thereof, up on the server
to allow users of you pages to use it or portions thereof. Some hosts
that cater to WebTV users, such as wtv-zone, have portions of
ImageMagick on their file manager pages. However I hear that the full
program requires huge server resources and it could slow a server down
greatly if a few people use it at one time. Many web host would not
allow you to install and keep the full version as it could slow down
the server too much.

Jun 11 '06 #7
I don't know about WPF/E, but you are so definately right about Adobe.
I'll avoid SVG and look at new technologies. Thank you so much!
--Julie

Laurent Bugnion wrote:
Hi,
JavaScript is not good at graphics. On the Web, a possible alternative
is SVG which can be scripted, thus allowing including new graphical
elements. However, SVG is likely to disappear soon (oh the controversy
,-) because of its very poor support by Adobe, and by the coming-soon of
WPF/E (CTP this July, release this winter) by Microsoft.

WPF/E is a very powerful graphics engine which will run in IE6, IE7,
Firefox, Opera on Windows, Safari on Macintosh, and later on Linux OSs.
WPF/E will support C# business logic and will also be scriptable. Very
exciting stuff really.

See Mike Harsh's blog for details.
http://blogs.msdn.com/mharsh

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch


Jun 12 '06 #8
wrote on 12 jun 2006 in comp.lang.javascript:
Laurent Bugnion wrote:
JavaScript is not good at graphics. On the Web, a possible alternative
is SVG which can be scripted, thus allowing including new graphical
elements. However, SVG is likely to disappear soon (oh the controversy
,-) because of its very poor support by Adobe, and by the coming-soon of
WPF/E (CTP this July, release this winter) by Microsoft.

WPF/E is a very powerful graphics engine which will run in IE6, IE7,
Firefox, Opera on Windows, Safari on Macintosh, and later on Linux OSs.
WPF/E will support C# business logic and will also be scriptable. Very
exciting stuff really.

See Mike Harsh's blog for details.
http://blogs.msdn.com/mharsh

[please do not toppost on usenet]
I don't know about WPF/E, but you are so definately right about Adobe.
I'll avoid SVG and look at new technologies. Thank you so much!

Simple "graph" graphics can very well be done by clientside javascript:

<http://devrijehuisarts.org/test/jsgraph.asp>

as I showed oct 2004 here:
<http://groups.google.com/group/micro...cript/msg/2eb2
9ecafa6105bf?hl=nl&>

This is usefull for dynamic graphs, as static ones can better be shown as
an image.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 12 '06 #9

cwdjrxyz wrote:
ju**********@gmail.com wrote:
hi, is there a pure javascript code (no Java applets), for painting or
drawing using a e-pencil or something, in a defined space on the
screen? best regards-(:JB:
You can generate simple
images such as some geometric figures using the math functions of
javascript, but this requires that you know a little analytical
geometry as well as how to use the script math functions to do this.


I looked at a few of my old backups and pulled out a few examples of
using javascript to draw and paint geometric images. For a limited
time, these examples will be posted at my site at
http://www.cwdjr.net/geometricDraw/ . I am afraid these do not use an
e-pencil, and your "something" option is javascript math functions :-)
.. Some of the code is old and likely could be improved, but I do not
have the time or interest to go over all of this again. At least the
code validates as CSS and as html 4.01 strict at the W3C.

Jun 13 '06 #10

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

Similar topics

136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
5
by: Alien | last post by:
I have a hex editor-type class that extends UserControl and paints its data to a PictureBox. Basically the problem is that repainting it takes usually between 60 and 80ms, which may seem pretty...
4
by: Dafü | last post by:
Hello! I have an application that paint graphics in VB.NET. Each graphic is painted after a long calculation process. My problem is when another windows pass over my graphics or I resize the...
1
by: Bob Hollness | last post by:
Hi all. I have given up trying to make my textboxes transparent. It can't be done (AFAIK!) So now, I am going to try to paint under the textbox the part of the screen that is covered by it. ...
2
by: Carl Gilbert | last post by:
Hi I am developing a custom on screen keyboard. So far I have an array of buttons and then using SendKeys to send the text of the button to the active control to receive the text. The only...
31
by: drclue | last post by:
Would you like to display the weather, stocks,movie listings or perhaps send someone an SMS text message or fax? Did you think Google or Yahoo maps was cool? No matter the back end or...
1
by: stowasser | last post by:
Does anyone know of a good drawing/ painting control? Anything that has a an online canvas that you can draw on and then add effects to? I don't mind a flash control, but I would like to use...
4
by: Marina Levit | last post by:
I am trying to do some processing on a background thread while keeping the UI painting. However, this is a generic server side call routine - and it needs to block until the server side call...
5
by: lazyvlad | last post by:
Hi, I'm writing here because this issue is becoming more annoying with each day it passes. So I have a form, a dataset with a few table adapters (3 to be precise) and a datagridview.The datagridview...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.