From fdc9c7938ab30c1318c03a6edec1a234efc4f732 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Mon, 8 Nov 2010 10:50:19 -0800 Subject: [PATCH] Context2d::StrokeRect() using Context::stroke() --- src/CanvasRenderingContext2d.cc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index 61ba45d..94bf62b 100644 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -1077,22 +1077,8 @@ Context2d::StrokeRect(const Arguments &args) { Context2d *context = ObjectWrap::Unwrap(args.This()); cairo_t *ctx = context->getContext(); cairo_new_path(ctx); - - if (!context->hasShadow()) { - cairo_rectangle(ctx, x, y, width, height); - SET_SOURCE(context->state->stroke); - cairo_stroke(ctx); - return Undefined(); - } - - context->shadowStart(); cairo_rectangle(ctx, x, y, width, height); - cairo_stroke(ctx); - - context->shadowApply(); - cairo_rectangle(ctx, x, y, width, height); - cairo_stroke(ctx); - + context->stroke(); return Undefined(); }