Commit Graph

962 Commits

Author SHA1 Message Date
Eric Pouech 5c637c228f gdi32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 10:31:43 +01:00
Fabian Maurer 86d36aefc8 gdi32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 09:55:04 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Alex Henrie ec72025cff gdi32/tests: Drop font test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 13:21:04 +01:00
Alex Henrie 524dbe4bef gdi32/tests: Mark a GetTextExtentPointW test as broken on Windows 10.
Fixes a testbot failure.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 13:21:01 +01:00
Zhiyi Zhang 1febcf692f gdi32/tests: Test deleting the bitmap used for pattern brush creation.
Test that the bitmap for pattern brush creation can be deleted after CreatePatternBrush() and the
created brush will still function normally. However, the bitmap object can not be retrieved from
LOGBRUSH.lbHatch if the bitmap is deleted.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:21:50 +01:00
Zebediah Figura 220b0a7c06 win32u: Do not free user memory when deleting dibs created with NtGdiDdDDICreateDCFromMemory().
This fixes a test crash in ddraw:ddraw1 introduced by
7d2a7b94aa.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Zebediah Figura c1ed24c86e gdi32/tests: Test whether D3DKMTDestroyDCFromMemory() frees the DC memory.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Alexandre Julliard d2e7a977cf gdi32/tests: Use the OS/2 last char for the Ansi charset limit.
Fixes a test failure with the cmmi10.ttf font.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-14 12:29:24 +01:00
Akihiro Sagawa 0d1b8adc9c win32u: Use a real family name as otmpFamilyName for substituted face.
GetTextFace remains to return the original face name, e.g. MS Shell Dlg.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 11:42:47 +01:00
Akihiro Sagawa 64c31e63b8 gdi32/tests: Test substituted face family name.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 11:42:45 +01:00
Jinoh Kang 9301a9e1f8 gdi32: Calculate effective number of scan lines and truncate bitmap bits for EMR_SETDIBITSTODEVICE.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang da126e19e3 gdi32: Allow passing BITMAPINFO with bmiHeader.biSizeImage == 0 for EMF DC.
User-facing APIs should accept biSizeImage == 0, and fix it up accordingly.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51834
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang 03e9b882a2 gdi32: Fix bounding box calculation for EMR_STRETCHDIBITS.
rclBounds should denote a closed interval for each axis.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang 3f7df2a5f6 gdi32/tests: Add tests for recording SetDIBitsToDevice in EMFs.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang 53617db97a gdi32/tests: Add tests for recording StretchDIBits in EMFs.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Paul Gofman 3ee036245b gdi32: Add a semi-stub for D3DKMTOpenAdapterFromDeviceName().
Fixes non functional setting page in Resident Evil Village.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:16:14 +02:00
Jacek Caban 33ecaf357e gdi32/tests: Add GdiTransparentBlt tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 20:22:12 +02:00
Jacek Caban 7b8a9db513 gdi32/test: Add tests for recording MaskBlt and PlgBlt in EMFs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 20:22:11 +02:00
Jacek Caban 5863f0af57 gdi32: Use zero biClrUsed in emfdc_create_brush when possible.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Jacek Caban 08d377c02f gdi32/tests: Add more metafile brush tests.
Based on brush.c.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:21 +02:00
Jacek Caban 5794b2da18 gdi32: Use shifted values for NTGDI_OBJ_* constants.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Jacek Caban 8217ce0fef gdi32: Use NtGdiGetRandomRgn for GetClipRgn.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 21:57:38 +02:00
Jacek Caban e4bb797252 gdi32: Use NtGdiExtCreatePen for ExtCreatePen.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 15:48:22 +02:00
Jacek Caban c3ad3f2bd0 gdi32/tests: Use winetest_debug to silence noisy traces.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Jacek Caban ba1769cb7d gdi32/tests: Add more char width tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Jacek Caban 2c467a2d1e gdi32: Reimplement CreateBrushIndirect on top of other brush constructors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:20 +02:00
Jacek Caban 233af3fdbf gdi32: Handle EMF recording clean up in DeleteDC.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 18:15:14 +02:00
Jacek Caban 6167fd3290 gdi32: Use NtGdiCreateClientObj for CreateMetaFile.
Instead of alloc_dc_ptr. Metafile DCs are not real DCs.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Jacek Caban 1c270965a8 gdi32: Use NtGdiDoPalette for GetSystemPaletteEntries.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-16 18:38:56 +02:00
Jacek Caban eb5c039f42 gdi32: Support MWT_SET in NtGdiModifyWorldTransform.
It's not defined in public headers, but it's documented in EMF spec.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-13 14:15:18 +02:00
Jacek Caban 6a14662521 gdi32/tests: Add more metafile blitting tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Jacek Caban acf56f57e8 gdi32: Handle metafiles directly in RealizePalette.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 16:32:07 +02:00
Jacek Caban 0804dfd276 gdi32: Handle EMFs directly in SelectObject.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 16:32:07 +02:00
Jacek Caban 5fdfe8c2d0 gdi32: Handle metafiles directly in SelectObject.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 16:32:07 +02:00
Jacek Caban 6d28f3029c gdi32: Support StockFlag in GDI_HANDLE_ENTRY.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:58:37 +02:00
Jacek Caban e349a4a131 gdi32: Store viewport origin in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Jacek Caban 81dbf2db45 gdi32: Store viewport extent in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Nikolay Sivov f47751a992 gdi32: Update font realization structure definition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 11:01:41 +02:00
Jacek Caban c129d13cbd gdi32: Use NtGdiGetDeviceCaps for GetDeviceCaps implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 14:27:38 +02:00
Jacek Caban d423244c1b gdi32: Use NtGdiSaveDC for SaveDC implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 14:27:12 +02:00
Jacek Caban 22f7e39fb7 gdi32: Store poly fill mode in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 15:40:43 +02:00
Jacek Caban 6a2decc259 gdi32: Move background color to DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:04 +02:00
Jacek Caban 148a2b60a5 gdi32: Move layout to DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:04 +02:00
Jacek Caban 99b591582d gdi32: Use get_dc_attr in SetBkMode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 21:09:49 +02:00
Jacek Caban a81d0b97cb gdi32: Use get_dc_attr in SetTextAlign.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 21:09:48 +02:00
Jacek Caban 6762f6ac52 gdi32: Use META_EXTFLOODFILL records for ExtFloodFill.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban e7b9a16bc2 gdi32: Use SetPixel for SetPixelV implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 5a71d8415e gdi32: Use NtGdiSetPixel for SetPixel implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 972cfaca1f gdi32: Use ntgdi interface for path functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00