Browse Source

Fixed isPointInPath(), take stroke into account

v1.x
Tj Holowaychuk 14 years ago
parent
commit
7df745fac8
  1. 2
      src/CanvasRenderingContext2d.cc

2
src/CanvasRenderingContext2d.cc

@ -450,7 +450,7 @@ Context2d::IsPointInPath(const Arguments &args) {
cairo_t *ctx = context->getContext();
double x = args[0]->NumberValue()
, y = args[1]->NumberValue();
return Boolean::New(cairo_in_fill(ctx, x, y));
return Boolean::New(cairo_in_fill(ctx, x, y) || cairo_in_stroke(ctx, x, y));
}
return False();
}

Loading…
Cancel
Save