FAOENTRY - canvas

D

Dr J R Stockton

A <FAQENTRY> on <canvas> might be useful; or a FAQ Note.

For those who have not used a PostScript-like system before, it may not
be obvious how some things can be done.

Examples :
drawing ellipses : save, scale, circle, restore
dashed line : repeat (save, rotate, draw X-segment, restore)
save context and use that more than once : impossible?
save picture and use that more than once : [get][put]ImageData
do it in MSIE : wait for IE 10+?
 
G

Garrett Smith

Dr said:
A <FAQENTRY> on <canvas> might be useful; or a FAQ Note.

For those who have not used a PostScript-like system before, it may not
be obvious how some things can be done.

Examples :
drawing ellipses : save, scale, circle, restore
dashed line : repeat (save, rotate, draw X-segment, restore)
save context and use that more than once : impossible?
save picture and use that more than once : [get][put]ImageData
do it in MSIE : wait for IE 10+?
For IE, the closest thing is VML.

RobG posted a tutorial not too long ago on this:
http://billmill.org/static/canvastutorial/move.html

My experience with canvas is essentially none at this point.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Fri, 19 Mar 2010 08:38:53, Garrett Smith
Dr said:
A <FAQENTRY> on <canvas> might be useful; or a FAQ Note.
For those who have not used a PostScript-like system before, it may
not
be obvious how some things can be done.
Examples :
drawing ellipses : save, scale, circle, restore
dashed line : repeat (save, rotate, draw X-segment, restore)
save context and use that more than once : impossible?
save picture and use that more than once : [get][put]ImageData
do it in MSIE : wait for IE 10+?
For IE, the closest thing is VML.

IE users should see <http://www.browserchoice.eu/terms/terms_en.htm>.

Those remarks are partly generic for similar systems not directly
implementing those features.
RobG posted a tutorial not too long ago on this:
http://billmill.org/static/canvastutorial/move.html

Those who override users' font choices with sans-serif should avoid any
words for which changing 'cl' to 'd' gives another word, e.g. clone.

'$' us not visibly defined? <g>

In the directions currently of interest to me, I'm past that stage.

My experience with canvas is essentially none at this point.

Look at <URL:http://www.merlyn.demon.co.uk/js-grphx.htm>; it can read
files or the pre-loaded editable textarea provided. One of the preset
editable file names loads the dashed-line code.
 
M

Michael Haufe (\TNO\)

Dr said:
A <FAQENTRY> on <canvas> might be useful; or a FAQ Note.

Michael said:
If that's the case, then why should VML/SVG be excluded?
Suggesting inclusion of something does not imply suggesting the
exclusion of something else.  I don't know enough about either to
comment.

But it does imply the inclusion of the related topics. The point is
that inclusion of VML/SVG would complicate the FAQ IMO, and HTML
Canvas is the foot in the door.
If any such (canvas included) are mentioned, a link to a small, but not
trivial, example should be included - about a page of A4.

How about this?
http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.png
 
D

Dr J R Stockton

In comp.lang.javascript message <a75ae4cf-c917-45fe-b233-9361be0d82d0@g2
8g2000yqh.googlegroups.com>, Sat, 20 Mar 2010 18:38:59, "Michael Haufe
(\"TNO\") said:
But it does imply the inclusion of the related topics. The point is
that inclusion of VML/SVG would complicate the FAQ IMO, and HTML
Canvas is the foot in the door.

The lack of ANY mention is a defect, if VML/SVG is/are as useful as
canvas is. There is no call for embedding a tutorial in the FAQ, but a
link or two would be worth their space.

The FAQ, as an updating document, should briefly indicate the breadth of
support in current and recent browsers.




It could be useful, if it could be read[*]. But it is not an example.
The intention is to show by example what the language is like, not to
teach by example. URL added to relevant page.

[*] Font too small, even when printed. (Pity about the coloured bits;
I'm out of red ink). And the material does not fit on 1 A4 on my
printer.
 
D

Dr J R Stockton

In comp.lang.javascript message <R82dnUg-OeHZtTvWnZ2dnUVZ_gCdnZ2d@earthl
ink.com>, Sun, 21 Mar 2010 07:07:53, Joe D Williams
: FAOENTRY - canvas wrote


why compare it to anything specific?

Why not? That's the best example that I know (probably there are many
examples that I do not know; but a nodding acquaintance with PostScript
should not be uncommon).

For simple and complex examples of some current connections available
using our
newly-beloved html5 canvas element, please see x3dom.org.

Nothing useful found there, primarily because of the smallness of the
fonts. That which works of their "examples" are not examples but
demonstrations; the code is not manifest.
 
J

Jorge

In comp.lang.javascript message <R82dnUg-OeHZtTvWnZ2dnUVZ_gCdnZ2d@earthl
ink.com>, Sun, 21 Mar 2010 07:07:53, Joe D Williams


Nothing useful found there, primarily because of the smallness of the
fonts.  That which works of their "examples" are not examples but
demonstrations; the code is not manifest.

And this is at least the 2nd or 3rd attempt at a 3d context API for
the <canvas>, and it's not stable nor widely implemented yet. However,
this last webGL attempt at it looks promising:
http://webkit.org/blog/603/webgl-now-available-in-webkit-nightlies/
 
D

Dr J R Stockton

In comp.lang.javascript message <a1cbedbe-2d35-425c-aeb0-aebfb13775eb@z1
1g2000yqz.googlegroups.com>, Tue, 23 Mar 2010 03:21:09, Jorge
And this is at least the 2nd or 3rd attempt at a 3d context API for
the <canvas>, and it's not stable nor widely implemented yet. However,
this last webGL attempt at it looks promising:
http://webkit.org/blog/603/webgl-now-available-in-webkit-nightlies/

The FAQ proper should be describing features which can be safely used in
pages on the World-Wide Web. That means those in recent public releases
- not Alpha, not Beta, not Nightly - of all major browsers - or in most
of the major browsers AND in current draft or final standards.

Section 2.6 "What does the future hold for ECMAScript?" could be
followed by 2.7 "What does the future hold for HTML etc.?" which would
link to introductory and standards (and maybe **very** briefly describe)
material on such as canvas & other graphics.

The FAQ needs a backup server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top