Browse Source

Just use cairo_image_surface_create rather than cairo_surface_create_similar_image which was introduced in cairo 1.12.

Unfortunately the cairo distributed with GTK+, used in the Windows build, is only 1.10.

Using the similar_image version offers backends the chance to be more efficient, but the alternative used here is used as a fallback in the cairo code anyway.
v1.x
Andy Wood 10 years ago
parent
commit
dfc661f28f
  1. 2
      src/CanvasRenderingContext2d.cc

2
src/CanvasRenderingContext2d.cc

@ -372,7 +372,7 @@ Context2d::shadow(void (fn)(cairo_t *cr)) {
cairo_user_to_device_distance(_context, &dx, &dy);
int pad = state->shadowBlur * 2;
cairo_surface_t *surface = cairo_get_group_target(_context);
cairo_surface_t *shadow_surface = cairo_surface_create_similar_image(surface,
cairo_surface_t *shadow_surface = cairo_image_surface_create(
CAIRO_FORMAT_ARGB32,
dx + 2 * pad,
dy + 2 * pad);

Loading…
Cancel
Save