Skip navigation.

Claws, fangs, fur...

...the bear essentials

Canvas image cut-off problem solved

, , , , , , , , , , ,

Those of you who were curious enough to look at the preview of my Canvas Composition Studio over on Pantheonline.com, know that it suffered from having its composition images cropped in size. The cut-off seemed an arbitrary 300px wide by 150px high.

Together with an odd ghosting problem in Opera I spent a good year testing and trying. Not continuously, but on and off.

And I found the solution to the cut-off problem.

Hidden within the stack of the function calls, I managed to forget specifying a width and a height for the HTMLCanvasElements created in the library functions. I did specify every other width and height... from the recipient HTMLDivElement all the way down to the library functions' drawing algorythms.

In the current version of the draft specification for HTML5, the HTMLCanvasElement does define a width and height property, specifying that an implementation should default those dimensions to 300px by 150px, in case the author fails to supply them.

Problem solved. Expect an update of the preview pretty soon.

The long wait for Audio and Video supportI'm starting to like Internet Explorer

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

Download Opera, the fastest and most secure browser