diff --git a/ChangeLog b/ChangeLog index 09bcd37..99947e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-12-11 Eric Wasylishen + + * Source/cairo/CairoGState.m: + Add a call to cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); + on the pattern used to draw images. This keeps the edges of images + crisp when the are scaled up. + The description from the Cairo docs is: "pixels outside of the + pattern copy the closest pixel from the source". + 2009-11-19 Doug Simons * Source/x11/XGServerWindow.m: diff --git a/Source/cairo/CairoGState.m b/Source/cairo/CairoGState.m index 606e147..d4cb0da 100644 --- a/Source/cairo/CairoGState.m +++ b/Source/cairo/CairoGState.m @@ -1206,6 +1206,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op) cairo_matrix_init_scale(&local_matrix, 1, -1); cairo_matrix_translate(&local_matrix, 0, -2*pixelsHigh); cairo_pattern_set_matrix(cpattern, &local_matrix); + cairo_pattern_set_extend(cpattern, CAIRO_EXTEND_PAD); cairo_set_source(_ct, cpattern); cairo_pattern_destroy(cpattern); @@ -1220,6 +1221,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op) cairo_matrix_init_scale(&local_matrix, 1, -1); cairo_matrix_translate(&local_matrix, 0, -pixelsHigh); cairo_pattern_set_matrix(cpattern, &local_matrix); + cairo_pattern_set_extend(cpattern, CAIRO_EXTEND_PAD); cairo_set_source(_ct, cpattern); cairo_pattern_destroy(cpattern);