mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 16:08:20 +02:00
xlib: Apply the glyph offset
The (dst_x, dst_y) parameters passed to the XRenderCompositeText are misleading and do not perform any adjustment, so we have to do it ourselves. Fixes clip-operator Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
ad758280b6
commit
3454604459
1 changed files with 5 additions and 5 deletions
|
|
@ -1217,8 +1217,8 @@ _emit_glyphs_chunk (cairo_xlib_display_t *display,
|
|||
}
|
||||
elts[nelt].chars = char8 + size * j;
|
||||
elts[nelt].glyphset = info->glyphset;
|
||||
elts[nelt].xOff = glyphs[i].i.x;
|
||||
elts[nelt].yOff = glyphs[i].i.y;
|
||||
elts[nelt].xOff = glyphs[i].i.x - dst_x;
|
||||
elts[nelt].yOff = glyphs[i].i.y - dst_y;
|
||||
}
|
||||
|
||||
switch (width) {
|
||||
|
|
@ -1245,9 +1245,9 @@ _emit_glyphs_chunk (cairo_xlib_display_t *display,
|
|||
src->picture,
|
||||
dst->picture,
|
||||
use_mask ? info->xrender_format : NULL,
|
||||
src_x + elts[0].xOff,
|
||||
src_y + elts[0].yOff,
|
||||
elts[0].xOff - dst_x, elts[0].yOff - dst_y,
|
||||
src_x + elts[0].xOff + dst_x,
|
||||
src_y + elts[0].yOff + dst_y,
|
||||
elts[0].xOff, elts[0].yOff,
|
||||
(XGlyphElt8 *) elts, nelt);
|
||||
|
||||
if (elts != stack_elts)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue