mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 02:18:03 +02:00
Handle SOURCE and CLEAR operators when painting color glyphs
In cairo, most operators are composited this way: ((src IN mask) OP dst) LERP_clip dst but SOURCE and CLEAR operators are composited this way: (src OP dst) LERP_(clip IN mask) dst (why is this not specified anywhere in the docs or source tree?) With color glyphs, we were not special-casing SOURCE and CLEAR. We do now. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=102661
This commit is contained in:
parent
7f6b57a238
commit
99427c3f4f
1 changed files with 4 additions and 1 deletions
|
|
@ -2571,7 +2571,10 @@ composite_one_color_glyph (cairo_surface_t *surface,
|
|||
pattern = cairo_pattern_create_for_surface ((cairo_surface_t *)glyph_surface);
|
||||
cairo_matrix_init_translate (&matrix, - x, - y);
|
||||
cairo_pattern_set_matrix (pattern, &matrix);
|
||||
status = surface->backend->paint (surface, op, pattern, clip);
|
||||
if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR)
|
||||
status = surface->backend->mask (surface, op, pattern, pattern, clip);
|
||||
else
|
||||
status = surface->backend->paint (surface, op, pattern, clip);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue