Browse Source

Fixed Context2d::hasShadow()

v1.x
Tj Holowaychuk 14 years ago
parent
commit
47dc9377d8
  1. 8
      src/CanvasRenderingContext2d.cc

8
src/CanvasRenderingContext2d.cc

@ -1043,6 +1043,7 @@ Context2d::FillRect(const Arguments &args) {
cairo_t *ctx = context->getContext();
cairo_new_path(ctx);
printf("%d\n", context->hasShadow());
if (!context->hasShadow()) {
cairo_rectangle(ctx, x, y, width, height);
SET_SOURCE(context->state->fill);
@ -1177,14 +1178,9 @@ Context2d::Arc(const Arguments &args) {
/*
* Check if the context has a drawable shadow.
*
* The spec states we mush have an alpha > 0,
* as well as either x or y offset, however most
* implementations render with offsets of 0 so
* we will only take alpha into consideration.
*/
bool
Context2d::hasShadow() {
return state->shadow.a;
return state->shadow.a && state->shadowBlur;
}
Loading…
Cancel
Save