Browse Source

The +1 on the offset seems to match the browser's output better, but I can't work out why it would be needed (unless it's pixel alignment related).

v1.x
Andy Wood 10 years ago
parent
commit
2b366c684e
  1. 4
      src/CanvasRenderingContext2d.cc

4
src/CanvasRenderingContext2d.cc

@ -394,8 +394,8 @@ Context2d::shadow(void (fn)(cairo_t *cr)) {
// paint to original context
cairo_set_source_surface(_context, shadow_surface,
(x1 - pad + state->shadowOffsetX),
(y1 - pad + state->shadowOffsetY));
x1 - pad + state->shadowOffsetX + 1,
y1 - pad + state->shadowOffsetY + 1);
cairo_paint(_context);
cairo_destroy(shadow_context);
cairo_surface_destroy(shadow_surface);

Loading…
Cancel
Save