chafey/cornerstoneTools — pull request #10 by swederik (2014-12-03 00:20:50+00:00)
Title: WIP: Rectangular highlighting tool

Hello!

I've hacked together a highlighting tool by adding a darkening box to the canvas. It seems to work fine, but I'd like to make the handles a bit easier to see. If you know a better way to do the canvas drawing, I'm open to suggestions.

It looks like this at the moment:

![screen shot 2014-12-03 at 01 13 18](https://cloud.githubusercontent.com/assets/607793/5273597/ac168a32-7a89-11e4-9378-ed4fc770abbb.png)

The relevant canvas drawing section is done like this:

context.rect(0, 0, context.canvas.clientWidth, context.canvas.clientHeight);
context.rect(rect.width + rect.left, rect.top, -rect.width, rect.height);

The drawing clockwise and counterclockwise is done by following the second part of this StackOverflow question: http://stackoverflow.com/questions/6271419/how-to-fill-the-opposite-shape-on-canvas

Thanks!

Erik