mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 06:28:01 +02:00
Fix sign of delta-y for ExtTextOutW
This commit is contained in:
parent
b09fe42db5
commit
503505666f
1 changed files with 8 additions and 1 deletions
|
|
@ -263,7 +263,14 @@ _cairo_win32_surface_emit_glyphs (cairo_win32_surface_t *dst,
|
|||
next_logical_y = _cairo_lround (next_user_y);
|
||||
|
||||
dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
|
||||
dxy_buf[j+1] = _cairo_lround (next_logical_y - logical_y);
|
||||
/* When delta-y values are present in dxy_buf (the ETO_PDY flag is used), these
|
||||
* represent "displacement along the vertical direction of the font" (per MSDN:
|
||||
* https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-exttextoutw)
|
||||
* with positive values being upward (observed behavior, not explicitly documented).
|
||||
* This is the opposite of the top-to-bottom logical coordinate space used here,
|
||||
* so the subtraction is reversed compared to what would otherwise be expected.
|
||||
*/
|
||||
dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
|
||||
|
||||
logical_x = next_logical_x;
|
||||
logical_y = next_logical_y;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue