Errata

Canvas Pocket Reference

Errata for Canvas Pocket Reference

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 33
Example 1-5

The polygon function of Example 1-1 is missing in Example 1-5 on page 33 as well as in the corresponding example code (example5.js). Without the polygon function, the clipping region is not displayed.

There is a reference to the "polygon() method of Example 1-1" on page 32, but the full source code should be provided in the example code.

Anonymous  Feb 04, 2011 
Printed Page 46
The code snippet on the bottom

The code snippet on the bottom of page 46 has an error. It reads:

canvas.onclick = function(event) {

if (hitpath(this.getContext("2d"), event) {

alert("Hit!"); // Click over current path

}

};

But should be this -- notice the 3rd ")" on the 2nd line, closing the if
statement:

canvas.onclick = function(event) {

if (hitpath(this.getContext("2d"), event)) {

alert("Hit!"); // Click over current path

}

};

Anonymous  Jun 17, 2011 
Printed, PDF Page 93
Example

rotateAbout () example is _counter_ clockwise

2nd and 3rd transform args should be swapped, and 5th and 6th also need adjusting - what to, I don't know.

(or less elegantly, change the sign of theta.)

Anonymous  May 22, 2013