Browse Source

Make the shadow radius more accurately match the browser's, making use of sigma scale as used in SKIA: https://github.com/google/skia/blob/master/src/effects/SkBlurMask.cpp#L26.

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

2
src/CanvasRenderingContext2d.cc

@ -412,7 +412,7 @@ void
Context2d::blur(cairo_surface_t *surface, int radius) {
// Steve Hanov, 2009
// Released into the public domain.
--radius;
radius = radius * 0.57735f + 0.5f;
// get width, height
int width = cairo_image_surface_get_width( surface );
int height = cairo_image_surface_get_height( surface );

Loading…
Cancel
Save