Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
+ if (graphics_bounds.Y + graphics_bounds.Height < dst_area_bottom) dst_area_bottom = graphics_bounds.Y + graphics_bounds.Height; + + // Based on value of dst_area, the pixel number to draw is calculated. + if ((offset_mode == PixelOffsetModeHalf) || + (offset_mode == PixelOffsetModeHighQuality)) + { + // Based on experiments dst_area with value 0.5 should be rounded to 0.0 + // (rounding half down), that't why we are adding 0.4999 instead of 0.5 + dst_area.left = (INT)(dst_area_left + 0.4999); + dst_area.top = (INT)(dst_area_top + 0.4999); + dst_area.right = (INT)(dst_area_right + 0.4999); + dst_area.bottom = (INT)(dst_area_bottom + 0.4999); + + // With PixelOffsetMode Half we are checking color in the middle of destination pixel, + // that's why we are adding 0.5 to destination. + dst_pixel_offset = 0.5; This seems complicated for what I'd expect is equivalent to a different set of destination points in device space.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3865#note_45655