Correctly handle groups as clipping masks.

Closes .
This commit is contained in:
Jürg Lehni 2014-03-17 14:51:47 +01:00
parent 0fe52a7d39
commit 438de7013a
6 changed files with 64 additions and 44 deletions
src/path

View file

@ -309,8 +309,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
/*#*/ if (__options.nativeContains || !__options.booleanOperations) {
// To compare with native canvas approach:
var ctx = CanvasProvider.getContext(1, 1);
// Abuse clip = true to get a shape for ctx.isPointInPath().
this._draw(ctx, new Base({ clip: true }));
// Use dontFinish to tell _draw to only produce geometries for hit-test.
this._draw(ctx, new Base({ dontFinish: true }));
var res = ctx.isPointInPath(point.x, point.y, this.getWindingRule());
CanvasProvider.release(ctx);
return res;