Patch by Eric Wasylishen to set the pattern extend in the cairo backend.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29122 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-12-14 14:05:32 +00:00
parent fc841e8186
commit 9a47060a5a
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2009-12-11 Eric Wasylishen <ewasylishen@gmail.com>
* 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:

View file

@ -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);