FlashCanvas-20101115 released

What's new in FlashCanvas-20101115?

(Enhancements)

  • Made it possible to load image files from other domain.
  • Prepared FlashCanvas.saveImage() method.
  • Modified strokeText() to draw an outline of the text.
  • textAlign gets to support the directionality of "rtl".
  • Refactored the handling of resize event.

(Bug fixes)

  • Canvas was rendered incorrectly when printed.
    • Canvas was expanded if the page was in quirks mode.
    • The background was painted gray.
  • Tweaked the color parser to check the input more strictly.

(etc.)

  • Included canvas2png.js script that can be used to save a canvas image.
  • Made the examples compatible with IE9.

canvas2png.js

When you need to save a canvas image as an image file, Canvas2Image library is a commonly-used solution. Unfortunately, however, this library does not work well with some browsers such as Internet Explorer.

As an alternative and cross-browser solution, we prepared canvas2png.js script that works with all major browsers. This script saves a canvas image as a PNG file with the help of save.php script. canvas2png.js provides only one function, canvas2png(), that takes an HTMLCanvasElement as an argument and can be used in the following way.

var canvas = document.getElementById("mycanvas");
canvss2png(canvas);

Links

0 comments:

Post a Comment