Canvas Level-2

The next version of the Canvas, dubbed “Level 2,” is slated to have changes and updates to the API. The new features and functionality are in a constant state of flux. It appears that most of these new features are being added so that the Canvas can be more DOM accessible. At press time, it appeared that some of the following would make it into the final specification:

  • A way to define “hit regions” for mouse events instead of listening across the entire Canvas.

  • The TextMetrics object returned from context.measureText will include many more properties, including bounding box and height information.

  • New ways to create and use patterns from images and image data.

  • New Path objects that can have text applied.

For more information about the Canvas updates in HTML5.1, check out this site.

For more information about Canvas Level 2, check out this site.

Get HTML5 Canvas, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.