Browse Source

Removed shadow from stroke() for now

v1.x
Tj Holowaychuk 14 years ago
parent
commit
09f5278e1c
  1. 26
      src/CanvasRenderingContext2d.cc

26
src/CanvasRenderingContext2d.cc

@ -802,27 +802,7 @@ Context2d::Stroke(const Arguments &args) {
HandleScope scope;
Context2d *context = ObjectWrap::Unwrap<Context2d>(args.This());
cairo_t *ctx = context->getContext();
if (!context->hasShadow()) {
SET_SOURCE(context->state->stroke);
cairo_stroke_preserve(ctx);
return Undefined();
}
cairo_save(ctx);
cairo_translate(
ctx
, context->state->shadowOffsetX
, context->state->shadowOffsetY);
SET_SOURCE_RGBA(context->state->shadow);
cairo_stroke_preserve(ctx);
if (context->state->shadowBlur) {
Canvas::blur(context->getCanvas()->getSurface(), context->state->shadowBlur);
}
cairo_restore(ctx);
SET_SOURCE(context->state->stroke);
cairo_stroke_preserve(ctx);
return Undefined();
}
@ -1099,7 +1079,7 @@ Context2d::FillRect(const Arguments &args) {
cairo_fill(ctx);
if (context->state->shadowBlur) {
Canvas::blur(context->getCanvas()->getSurface(), context->state->shadowBlur);
//Canvas::blur(context->getCanvas()->getSurface(), context->state->shadowBlur);
}
cairo_restore(ctx);
@ -1139,7 +1119,7 @@ Context2d::StrokeRect(const Arguments &args) {
cairo_stroke(ctx);
if (context->state->shadowBlur) {
Canvas::blur(context->getCanvas()->getSurface(), context->state->shadowBlur);
//Canvas::blur(context->getCanvas()->getSurface(), context->state->shadowBlur);
}
cairo_restore(ctx);

Loading…
Cancel
Save