Friday, July 12, 2013

Status Update: Week 4

Athens is almost completely implemented in Amber. There are still some minor issues.

  • Browser compatibility: e.g. Firefox does not support line dashing, "miterLimit" is not set correctly in Chrome.

  • Drawing text: "getPreciseAscent" is not supported by Canvas. There is no nice way to get the height of a text (only dirty hacks involving reading pixels or creating DOM elements).

  • Canvas limitations: some paint modes not supported by Canvas (e.g. "colorBurn").


For now, I will not work on these issues.

The next steps will be implementing mouse events and tests. For mouse events, I have to implement an algorithm to transform paths to polygons and test if a given point is inside the polygon (probably De-Casteljau and Even-odd rule; a part of this is already implemented in Athens).

It is difficult to write automatic tests for Athens. My first idea was to render images and calculate the hash of the pixels. However, this value differs among browsers. I will probably start implementing manual tests: the tester sees a reference image and has to compare it to the actual Canvas rendering.

No comments:

Post a Comment