Tj Holowaychuk 14 years ago
parent
commit
63e4a4b3df
  1. 20
      src/CanvasRenderingContext2d.cc

20
src/CanvasRenderingContext2d.cc

@ -802,11 +802,31 @@ 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);
cairo_stroke_preserve(ctx);
return Undefined();
}
/*
* Fill text at (x, y).
*/

Loading…
Cancel
Save