Sweden-Number/dlls/user32
Zhiyi Zhang 04b4d0f380 gdi32: Partially implement HALFTONE stretch mode.
COLORONCOLOR(STRETCH_DELETESCANS) was used in place of HALFTONE. COLORONCOLOR mode may delete rows
of pixels without trying to preserve information so it will cause Wine to render poorly when the
destination rectangle is small.

According to tests, HALFTONE mode uses box filter when doing integer downscaling and nearest
neighbor interpolation when doing upscaling in both horizontally and vertically. In other cases,
HALFTONE mode uses a lanczos3 like algorithm to interpolate pixels. There are also other heuristics
involved. For example, shrinking a 2x2 image to 1x1 may not use box filter depending on image data.
Since this algorithm is undocumented, it's difficult to reverse engineer the original algorithm and
produce identical results. Instead, this patch uses a naive implementation of bilinear interpolation
to implement HALFTONE mode and it produces good quality images.

For 8-bit and lower color depth images, nulldrv_StretchBlt should resize the images first and then
converts color depth.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:55 +02:00
..
resources
tests gdi32: Partially implement HALFTONE stretch mode. 2021-06-15 20:43:55 +02:00
Makefile.in
button.c
caret.c
class.c
clipboard.c user32: Debugstr_format() should not modify the last error. 2021-06-03 21:50:58 +02:00
combo.c
controls.h
cursoricon.c user32: Delete info.hbmColor and hbmMask after copying. 2021-06-10 20:49:27 +02:00
dde_client.c
dde_misc.c
dde_private.h
dde_server.c
defdlg.c
defwnd.c user32: Add current keyboard layout to thread data. 2021-05-05 21:56:23 +02:00
desktop.c
dialog.c
driver.c user32: Add a default WindowPosChanging implementation. 2021-05-20 21:48:57 +02:00
edit.c
exticon.c
focus.c
hook.c
icontitle.c
input.c user32: Use get_primary_monitor_rect() helper. 2021-05-18 21:25:00 +02:00
listbox.c
lstr.c
mdi.c
menu.c
message.c server: Send HID report data with the WM_INPUT messages. 2021-05-31 12:31:21 +02:00
misc.c
msgbox.c
nonclient.c
painting.c
png.c
property.c
rawinput.c hidclass.sys: Factor HIDP_BUTTON_CAPS with HIDP_VALUE_CAPS. 2021-06-04 20:00:30 +02:00
resource.c
resources.h
scroll.c
spy.c
static.c
sysparams.c user32: Add a cache for EnumDisplayDevicesW(). 2021-05-18 21:25:00 +02:00
text.c
uitools.c
user32.rc
user32.spec user32: Implement InternalGetWindowIcon(). 2021-05-24 11:42:37 +02:00
user_main.c user32: Set keyboard layout preload key on init. 2021-05-06 20:00:42 +02:00
user_private.h user32: Implement WM_INPUT / RIM_TYPEHID message dispatch. 2021-05-31 12:30:41 +02:00
win.c user32: Implement InternalGetWindowIcon(). 2021-05-24 11:42:37 +02:00
win.h
winhelp.c
winpos.c user32: Depend on SetWindowPos to refresh window manager hints in SetWindowRgn. 2021-05-27 21:25:56 +02:00
winproc.c
winstation.c
wsprintf.c