Commit Graph

2520 Commits

Author SHA1 Message Date
Byeongsik Jeon 2b52474fdd gdi32: Respect the FC_ANTIALIAS setting for the FC_RGBA_NONE case.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 14:49:25 +01:00
Byeongsik Jeon af90ab3259 gdi32: Remove the code that doesn't work as intended around FcFontList().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 14:49:24 +01:00
Byeongsik Jeon 2fe859b8ef gdi32: Support other settings for obtaining the default_aa_flags value.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 11:30:06 +01:00
André Hentschel e64cd493d2 gdi32: Spelling fixes in a comment.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 15:28:58 +02:00
Byeongsik Jeon 649dd1292d gdi32: Support the gamma correction for the subpixel rendering.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 22:36:43 +02:00
Akihiro Sagawa 9f458df88c gdi32: Adjust destination coordinates in some special cases.
When the source rectangle needs to flip and it doesn't fit in the
source device area, the destination image is flipped but the
destination area isn't flipped.  GdiAlphaBlend doesn't support
mirroring, the above isn't applicable.

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>
2018-10-15 13:55:14 +02:00
Akihiro Sagawa 566b92320c gdi32: Fix negative width/height handling in stretch bitblt family.
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>
2018-10-15 13:55:05 +02:00
Akihiro Sagawa 71c9a8f3ca gdi32/tests: Add more stretch bitblt tests.
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>
2018-10-15 13:54:46 +02:00
Akihiro Sagawa bdfbd32e85 gdi32: Use the helper function to order the points of a rectangle.
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>
2018-10-12 09:48:29 +02:00
Byeongsik Jeon fe6d35f3cb gdi32: Move the 'if' branch out of the loop.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:43:32 +02:00
Byeongsik Jeon 11d68d05a7 gdi32: Remove unnecessary operations.
The rgb part works from text rendering to alpha value.
The '24' part is an unnecessary operation.

Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:43:20 +02:00
Byeongsik Jeon 66e446c5ec gdi32: Improves the subpixel rendering availability for FreeType 2.8.1+.
FreeType 2.8.1+ implemented its own subpixel rendering.
So FT_Err_Uniplemented_Feature check is not the reliable way.

Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 12:38:22 +02:00
Michael Stefaniuc fb7a8d92fd gdi32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 12:46:18 +02:00
Michael Stefaniuc 02b7f00a11 gdi32: Avoid a variable holding an ARRAY_SIZE.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 12:46:14 +02:00
Alex Henrie 47ab490427 gdi32: Avoid using GCC's typeof extension.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-21 23:58:56 +02:00
Alexandre Julliard d99f682118 gdi32: Don't return screen resolution on printer devices.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:52:31 +02:00
Alexandre Julliard d0579649c1 gdi32: Fall back to GetSystemMetrics() for the virtual desktop size.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 12:57:00 +02:00
Alexandre Julliard 6d395fcca4 gdi32: Fall back to GetSystemMetrics() for the screen size.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 11:46:10 +02:00
Daniel Lehman e976e179ae gdi32: Update edgetable limits with top and bottom.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 14:13:43 +02:00
Daniel Lehman 418514820f gdi32/tests: Add test for clipped polygon.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 14:13:43 +02:00
Michael Müller 96721e4291 gdi32: Treat lpResults as optional in GetCharacterPlacement.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 10:04:09 +02:00
Alexandre Julliard 766287ad6a server: Return the surface rect as top clipping rect.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-11 15:45:11 +02:00
Alex Henrie 478a3d64ef gdi32: Add DECLSPEC_HOTPATCH to GetDIBits.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-06 19:44:27 +02:00
Nikolay Sivov d4eeb162bb tools: Update to Unicode 11.0.0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-03 12:01:40 +02:00
Michael Stefaniuc 314a276f19 gdi32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-26 13:29:10 +02:00
Dmitry Timoshkov c1f742021f gdi32: For symbol fonts check whether the char has been converted to Unicode.
This means that Unicode versions of text functions can use the result
of a A->W conversion under CP_ACP.

It's required so that the following will work:
  hfont = CreateFont("Wingdings", SYMBOL_CHARSET);
  SendMessageA(hwnd, WM_SETFONT, hfont);
  SendMessageA(hwnd, WM_SETTEXT, textA);

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:45:33 +02:00
Zebediah Figura 7527ab493e gdi32/tests: Test writing to the default palette.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:45:00 +02:00
Alex Henrie 7c57461d29 gdi32: Fix memory leak on error in PATH_WidenPath (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-04 14:22:36 +02:00
Alex Henrie e3648c7a61 gdi32: Avoid awkward cast in GetGlyphOutlineA (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 20:01:28 +02:00
Vincent Povirk b6da3547d8 gdi32: Check that emf records are within the file.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-09 15:55:01 +02:00
Vincent Povirk 8d2676fd14 gdi32: Check for truncated EMF files.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-09 15:54:08 +02:00
Alexandre Julliard 60085f4e36 gdi32: Scale stock fonts based on the DPI awareness.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-12 13:50:01 +02:00
Alexandre Julliard 31967ef51d gdi32: Take DPI awareness into account for the LOGPIXELSX/Y device caps.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-12 13:26:31 +02:00
Alexandre Julliard 0188dc7da8 gdi32: Clip the computed region to the DIB rectangle in PolyPolygon().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:52 +02:00
Alexandre Julliard 737a113c10 gdi32: Add a helper function to retrieve the DIB rectangle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:52 +02:00
Alexandre Julliard 99b64f7432 gdi32: Build the region object directly instead of making a copy in CreatePolyPolygonRgn.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:51 +02:00
Alexandre Julliard 97f996744e gdi32: Pre-allocate the points array in CreatePolyPolygonRgn.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 15:43:33 +02:00
Roderick Colenbrander 3de61a9dd9 winevulkan: Define vulkan driver interface.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:16 +01:00
Akihiro Sagawa dce3e17185 gdi32: Fix text metrics in synthetic bold bitmap fonts.
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>
2018-02-19 16:55:08 +01:00
Akihiro Sagawa b4a10d17c6 gdi32/tests: Add more text metrics tests in synthetic bold bitmap fonts.
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>
2018-02-19 16:55:08 +01:00
Akihiro Sagawa 68f9fb556d gdi32: Fix synthetic bold outline text metrics.
Without this fix, synthetic tmAveCharWidth value unintentionally affects
SCALE_X calculation.

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>
2018-02-19 16:55:08 +01:00
Akihiro Sagawa c17a8f32c4 gdi32: Fix ABC width calculations when using vertical font.
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>
2018-02-08 10:20:24 +01:00
Akihiro Sagawa 34c4687f25 gdi32/tests: Add more ABC width tests with vertical font.
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>
2018-02-08 10:20:21 +01:00
Akihiro Sagawa da63c2356d gdi32/tests: Add more ABC width tests in various widths.
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>
2018-02-08 10:20:19 +01:00
Akihiro Sagawa 2a402a427a gdi32: Fix ABC width calculations when applying transformations internally.
This fixes a regression introduced by f6bc356860.

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>
2018-02-08 10:20:16 +01:00
Michael Stefaniuc 5c3928df94 gdi32/tests: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 09:46:37 +01:00
Huw Davies 82973cfbd1 gdi32: Allocate the bitmap bits during CreateBitmapIndirect() to catch out-of-memory errors.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 11:33:39 +01:00
Huw Davies 1def41b903 gdi32: Don't bother using the return value of HeapFree().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 12:21:09 +01:00
Alexandre Julliard 90273a6e81 gdi32: Fix clipping to the DIB rectangle in GetPixel().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 16:29:03 +01:00
Huw Davies ccc871dcd0 gdi32: Set otmMacLineGap from the line gap in the hhea table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-19 19:49:02 +01:00
Alex Henrie d819609255 gdi32: Scale outline font metrics as signed integers.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-19 19:49:01 +01:00
Fabian Maurer 6f790606c0 gdi32: In AddFaceToList allow fonts with long names and add tests.
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>
2017-11-28 22:00:39 +01:00
Alexandre Julliard 17dffaac7d opengl32: Get WGL function definitions from the XML files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 10:06:10 +02:00
Huw Davies de9d224996 gdi32: Ignore the alpha channel for blits to DDBs too.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-06 21:48:49 +02:00
Nikolay Sivov d82321006d gdi32: Pick first charmap if none was selected using preferred encoding.
FreeType 2.8.1 has similar logic removed from WinFNT module,
that always pre-selected first charmap.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 11:20:08 +02:00
Nikolay Sivov 2bd5f6e057 gdi32: Remove runtime check for FT_Set_Charmap().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 11:20:01 +02:00
Alexandre Julliard 66507e86c0 gdi32: Do not dither non-extended wide pens.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:14:30 +02:00
Alexandre Julliard 1c56b3b516 gdi32: Use the correct brush origin when the blit operation requires an intermediate bitmap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:10:45 +02:00
Alexandre Julliard 97a9db43d2 gdi32: Pass the brush origin explicitly to the brush backend functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 09:08:41 +02:00
Andrew Eikum 083e61fddf gdi32: Update metafile world transform immediately in winnt mode.
The Chrome browser print function implements their own handling for
EMR_MODIFYWORLDTRANSFORM which calls ModifyWorldTransform on the HDC
directly without ever calling PlayEnhMetaFileRecord. In Wine, this
transformation would get discarded when the callback function returned,
causing the page to be printed at the wrong scale.

Tests show that the transform is updated immediately during
PlayEnhMetaFileRecord. In addition, a modified transform persists
between callbacks until PlayEnhMetaFileRecord is called on a relevant
type of callback, at which point the transform is reverted before
playing back the record.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 18:30:18 +02:00
Alexandre Julliard 593def1756 gdi32/tests: Run DIB tests also against a monochrome DDB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 12:47:14 +02:00
Alexandre Julliard 80ae5c968e gdi32: Always dither brush when painting to a 1-bpp device.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 10:05:55 +02:00
Alexandre Julliard 103f2646d5 gdi32/tests: Add a test case for DIB color painting.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 10:05:55 +02:00
Huw Davies 9ea33ed00a gdi32: Cache the device caps from the reference dc, since the dc may become invalid.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 14:16:47 +09:00
Huw Davies 8e9af9e016 gdi32: Respect the rop mode in SetPixel.
Based on a patch by Tim Worthington.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Huw Davies 46e6ee48f3 gdi32: Add a helper to fill rectangles with a given pixel.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Akihiro Sagawa 22135ba583 gdi32: Return non-zero VREFRESH value for display devices.
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>
2017-07-21 18:39:27 +02:00
Jens Reyer ebbbe85038 make_unicode: Use VerticalOrientation.txt from UCD.
Signed-off-by: Jens Reyer <jre.winesim@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:45:18 +02:00
Alexandre Julliard 474f9ff1fa gdi32: Avoid having the source alpha channel interfere with color comparisons in GdiTransparentBlt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 11:43:50 +02:00
Piotr Caban f629e9797d gdi32: Don't write EMR_EXTSELECTCLIPRGN to emf file on SelectClipPath call.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-22 10:56:58 +02:00
Alexandre Julliard 0c005a329e gdi32: Return more meaningful data in the null driver GetDeviceCaps implementation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 13:22:48 +02:00
Huw Davies 2dfb09893c gdi32: Try to read the dpi from the user key first.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:22:47 +02:00
Piotr Caban 3471b59ae0 gdi32: Only delete unmodified font keys in delete_external_font_keys.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-26 10:59:40 +02:00
Piotr Caban 93def703cf gdi32: Allocate smaller buffer in delete_external_font_keys helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-26 10:59:40 +02:00
Sebastian Lackner f625707ffc configure: Support for recent versions of OSMesa.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 19:21:49 +02:00
Nikolay Sivov bba13f04c4 gdi32: Fix widths returned by GetCharWidthI().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 10:14:12 +02:00
Nikolay Sivov 215e8b10a8 gdi32: Trace charmap encoding as 4 bytes tag.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:20 +02:00
Huw Davies 8dc039a7d1 gdi32/tests: Prevent a crash if the shell dlg font is not found.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:17:27 +02:00
Huw Davies 858c07f667 gdi32/tests: Combine the matching macros into a single function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 09:54:18 +01:00
Alexandre Julliard 57aa60689d gdi32/tests: Remove workarounds for old Windows versions in the DIB tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 20:13:16 +01:00
Alexandre Julliard 059170208a gdi32: Map the black and white entries to the DIB color table after dithering.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 20:12:50 +01:00
Alexandre Julliard c54b667e25 gdi32: Add support for DIBINDEX colors in 1-bpp blits.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:29:51 +01:00
Alexandre Julliard 89d31e42fc gdi32: Fix color conversion when blitting to 1-bpp by matching pixels instead of color values.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:07:46 +01:00
Alexandre Julliard 71d2d4ee96 gdi32: Add more helper functions for RGB to pixel conversions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 20:57:41 +01:00
Nikolay Sivov 533d800d42 gdi32: Cleanup otmfsType bit mask from reserved bits.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 10:00:02 +01:00
Nikolay Sivov be287422ce gdi32/tests: Test that otmfsType field is cleaned up from reserved bits.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 10:00:00 +01:00
Huw Davies be908f2f26 gdi32/tests: Test blitting from a D3DKMT bitmap to a regular bitmap.
Based on a patch by Henri Verbeet.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:28 +01:00
Huw Davies 0bec2f7965 gdi32: Calculate the stride from the image size.
This allows bitmaps to be created by D3DKMTCreateDCFromMemory() which have more freedom
in their choice of stride.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:28 +01:00
Huw Davies a4f0415a5b gdi32: Calculate the stride from the image size.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:28 +01:00
Huw Davies fe26147c17 gdi32: Reset the image size when cropping the source bitmap.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:28 +01:00
Huw Davies 2eeed2df51 gdi32: Initialize biSizeImage in the DDB's bitmapinfo.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Huw Davies 8c2374ab08 gdi32: Update biSizeImage when uncompressing the RLE bitmap.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Huw Davies a3e09aa43f gdi32: Use the image size returned by GetImage.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Huw Davies 9d0338bc4f gdi32: Don't copy biSizeImage in copy_color_info().
It meant there was a hack which incorrectly changed the corresponding value in src_info.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 21:45:27 +01:00
Francois Gouget 4099ddb521 gdi32/tests: Add inline, __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
And standardize their formatting and parameter names.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 10:24:23 +01:00
Huw Davies 0805b0d567 gdi32: Add the ability to disable a DC.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 10:46:20 +01:00
Fabian Maurer e0ad2c3e5f gdi32: Add traces for painting functions.
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>
2017-01-25 11:26:58 +01:00
Alexandre Julliard c0b30432ea gdi32: Support PALETTEINDEX colors for 1-bpp DIB blits.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-27 20:09:02 +01:00
Daniel Lehman 0d9f044dcd gdi32: Trace more in CreateEnhMetaFileW.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-30 13:26:27 +01:00
Ken Thomases d684831f4a gdi32: Get the font URL directly from the descriptor on macOS 10.6 and later.
It's significantly faster than the roundabout way that's necessary for
10.5, which is especially important for users with many fonts installed.
Issue identified by Andrew Eikum.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-29 19:14:22 +01:00
Daniel Lehman 5244bd0748 gdi32: Initialize rgbReserved to zero in SetDIBColorTable.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:36:39 +01:00
Henri Verbeet d837b71557 gdi32: Add support for D3DDDIFMT_A4R4G4B4 and D3DDDIFMT_X4R4G4B4 to D3DKMTCreateDCFromMemory().
These are needed by wined3d to support DCs on WINED3DFMT_B4G4R4A4_UNORM and
WINED3DFMT_B4G4R4X4_UNORM textures, as required by the Microsoft Motocross
Madness demo. Note that these formats are not available on versions of Windows
newer than Vista, and as far as I'm aware the application doesn't work on
those versions. I don't expect exposing more formats to be an issue in
practice, but these could be hidden behind a version check if needed.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-17 07:41:47 -06:00
Huw Davies 04f8ecd956 gdi32: Check that ExtFloodFill()'s initial co-ordinates lie within the dib.
It might seem more natural to move this check inside is_interior(), but
this would slow down the unclipped case.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-29 22:40:06 +09:00
Huw Davies c429c595e8 gdi32: Explicitly write out the rops for copy_rect_1().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:07 +09:00
Huw Davies efd6292fae gdi32: Split out the various offset cases for copy_rect_1() into separate functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:05 +09:00
Huw Davies e1ce79ec94 gdi32: Explicitly write out the rops for mask_rect_32().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:03 +09:00
Huw Davies 4b39c7b944 gdi32: Explicitly write out the rops for copy_rect_32().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:59:00 +09:00
Huw Davies 1d0e25e600 gdi32: Move the outer loop into separate functions for each direction.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 19:58:58 +09:00
Huw Davies a875e3c6ab gdi32: Unroll the start- and end-of-line loops.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 45b848ccd1 gdi32: Handle the case of a partial source byte separately.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 6c7ed1214c gdi32: Eliminate a masking operation by generating a larger colour table.
This helps significantly for large rectangles.

This is only done for the 32-bpp case as typically the lower bit
depths would more likely be used to draw small icons and the like,
where the extra fixed cost of this optimization will potentially
outweigh the savings.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 01:10:21 +09:00
Huw Davies 9fe77b4d7b gdi32: Exponentially grow successive point buffers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 11:53:32 +09:00
Nikolay Sivov fcd0f6b074 gdi32: Append "TrueType" suffix to registry key names.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 18:28:41 +09:00
Nikolay Sivov 492b10ef6c gdi32: Simplify font table name tracing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 18:28:38 +09:00
Nikolay Sivov 7e50116b52 gdi32: Support special 'ttcf' tag in GetFontData().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-12 20:38:20 +09:00
Nikolay Sivov cd68821780 gdi32: Keep font tables tags defined in one place.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-12 20:38:02 +09:00
Michael Stefaniuc 68f1df237a gdi32/tests: Make use of todo_wine_if().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 09:14:34 -05:00
Nikolay Sivov 41fa3f02ef gdi32: Fix its vs it's typo.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 09:56:19 -05:00
Huw Davies 28bb9d15a6 gdi32: Only reselect the objects if the linear transform portion changes.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:30:17 -05:00
Sebastian Lackner aa4a1e17a2 gdi32/enhmfdrv: Remove unused debug channel.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:30:11 -05:00
Huw Davies 0f2a776a59 gdi32: Convert a few uses of get_dc_ptr() to get_physdev_dc().
In these cases we have the PHYSDEV meaning we own the DC already.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies 199ca9258a gdi32: Access several more properties directly from the DC.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies aa4934783f gdi32: Where possible directly access the DC instead of using GetCurrentObject().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies d4d65e2df9 gdi32: Move the release until after the final dc access.
Also only reselect the font if the graphics mode changes.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies e1130cbb99 gdi32: Add an internal version of DPtoLP that takes a DC pointer.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies 637c99f675 gdi32: Remove an unnecessary call to get_dc_ptr().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies e767a60790 gdi32: Access a few more properties directly from the DC in the path driver.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies 377010dcfc gdi32: Pass a DC pointer to PATH_CheckCorners().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies f1aaf0efb0 gdi32: Pass a DC pointer to the point adding routines.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies 1b4f0f8a07 gdi32: Pass the path directly to start_new_stroke().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies 67520ebaf5 gdi32: Pass a DC pointer to get_gdi_flat_path().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:34 +09:00
Huw Davies 0c1e42235a gdi32: Don't call GetObjectW() unless necessary.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:33 +09:00
Huw Davies 41f763ea87 gdi32: Add an internal version of GetTextCharsetInfo() that takes a DC pointer.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:32 +09:00
Huw Davies 22202eae59 gdi32: Use a buffer on the stack if the number of points is small.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:32 +09:00
Huw Davies 5118d1312c gdi32: Access a few more properties directly from the DC in the dib driver.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:09 +09:00
Huw Davies d8e353f99f gdi32: Pass a DC pointer to get_pixel_color().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:09 +09:00
Huw Davies cf386b8b64 gdi32: Pass a DC pointer to get_mono_dc_colors().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:08 +09:00
Huw Davies 9efe66a83a gdi32: Use lp_to_dp() instead of LPtoDP() in the dib driver.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:10 +09:00
Huw Davies 7fa6dfecc9 gdi32: Pass a DC pointer to get_device_rect() to avoid accesses via the handle.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:09 +09:00
Huw Davies 36a0bb0f52 gdi32: Avoid unnecessary calls to get_dc_ptr().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:09 +09:00
Huw Davies 6a8cfea99b gdi32: Use POINT and SIZE to hold positions and extents.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:08 +09:00
Huw Davies f4bc213ce5 gdi32: Use an internal version of LPtoDP that takes a DC * where possible.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-18 19:38:14 +09:00
Huw Davies af5014f4c8 gdi32: Add a small rectangle buffer to reduce memory allocation.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-18 19:38:12 +09:00
Huw Davies 01c33fb983 gdi32: Add helpers to allocate, grow and free regions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-18 19:38:09 +09:00
Huw Davies 778faedbae gdi32: Copy 1-bpp pixels one byte at a time.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 19:56:38 +09:00
Huw Davies da8834609a gdi32: Reduce the number of memory allocations required for gdi paths.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:26:10 +09:00
Huw Davies 54ec86021a gdi32: Change get_gdi_flat_path() to return an opaque path pointer.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:26:10 +09:00
Huw Davies 23751e0ac2 gdi32: Use alloc_gdi_path() to create the path.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:18:31 +09:00
Jacek Caban 585f6074b0 gdi32: Make CreateDIBSection hotpatchable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:18:27 +09:00
Huw Davies a8044bebe8 gdi32: Add a mask_rect primitive for use when the src is 1bpp.
This essentially combines the format conversion with a copy_rect.

It cannot be used when stretching, since stretching of 1bpp is
slightly special.  Similarly, it cannot be used if the dst is also
1bpp (hence there is no mask_rect_1) or if the rop involves the brush.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +09:00
Huw Davies f5bffe0ef7 gdi32: Use the get_mono_dc_colors() helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +09:00
Huw Davies 622c01c5e1 gdi32: Add back the extents test.
Spotted by Sebastian Lackner.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-09 11:03:55 +09:00
Huw Davies fc2d310949 gdi32: Add get_any_obj_ptr() to retrieve the ptr and type of a GDI handle.
This enables get_dc_obj() to check the type without calling GetObjectType()
and thus it saves additional calls to Enter/LeaveCriticalSection().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 23:07:22 +09:00
Michael Stefaniuc 0b96693f75 gdi32: Remove a redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 20:12:19 +09:00
Huw Davies f7b6a7d77a gdi32: Precompute the destination colours for sources with a colour table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Huw Davies f59d3f60e1 gdi32: Use a binary search for PtInRegion() and RectInRegion().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Huw Davies 7fd44a511f gdi32: Use a binary search to generate the clipped rects.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Sebastian Lackner 69d895ac86 gdi32: Fix copy & paste mistake in a comment.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 19:55:57 +09:00
Michael Stefaniuc 8acdf5e7bf gdi32: Use wine_dbgstr_rect() to trace a RECT.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 23:22:04 +09:00
Huw Davies 6526ac1999 gdi32: Try to compact the region.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 21:03:58 +09:00
Huw Davies 27375d8476 gdi32: Try to coalesce into wider bands.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 21:03:42 +09:00
Huw Davies 0e93387d9b gdi32: Use the add_rect() helper to add a rectangle.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 21:03:33 +09:00
Francois Gouget d7e18f6540 mfdrv: Fix a typo in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 11:01:25 +09:00
Alexandre Julliard b70cda9a1e gdi32/tests: Add a test to run once through all functions supported on paths.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-24 15:33:04 +09:00
Alexandre Julliard 06234a081a gdi32: Reimplement Ellipse in paths to avoid calling imprecise arc helper functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-24 15:33:04 +09:00
Alexandre Julliard 0b38f16767 gdi32: Reimplement RoundRect in paths to avoid calling imprecise arc helper functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-24 15:33:04 +09:00
Alexandre Julliard 1fcf8f547a gdi32: Compatibility fixes for Rectangle in paths, with tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-24 15:33:03 +09:00
Alexandre Julliard 57d2009035 gdi32: Add a helper function to reverse an array of points in paths.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-24 13:21:47 +09:00
Alexandre Julliard 117f862ce5 gdi32: Validate the point count in Polyline and Polygon.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-23 12:36:23 +09:00
Alexandre Julliard b2702b2d6f gdi32/tests: Get rid of the todo mechanism in the path tests.
All the tests succeed now.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-23 12:36:15 +09:00
Michael Stefaniuc 6d21655ed9 gdi32/tests: Use SetRect() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-22 22:09:17 +09:00
Alexandre Julliard 84ce9dfba7 gdi32: Start a new path stroke when the current position differs from the last.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-22 22:09:17 +09:00
Alexandre Julliard e68d68fb7d gdi32: Fix setting the path flags in PolyPolyline and PolyPolygon.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-22 22:09:17 +09:00
Alexandre Julliard c7bbc83062 gdi32: Implement bounds for FillPath, StrokeAndFillPath and StrokePath in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-22 00:58:54 +09:00
Alexandre Julliard 625ff9b528 gdi32: Implement a path driver for enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 14:54:49 +09:00
Alexandre Julliard 6bab6ad40d gdi32: Add a helper function to return the metafile device.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 14:54:02 +09:00
Alexandre Julliard 234daa7522 gdi32: Implement DeleteDC in the path driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 14:53:06 +09:00
Michael Stefaniuc 75426bb926 gdi32/tests: Use wine_dbgstr_rect() to print RECTs.
Two old (win95 and winnt) broken() removed en passant.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 00:23:56 +09:00
Alexandre Julliard c500713dd3 gdi32: Fix updating the current position in PolyDraw.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 00:23:50 +09:00
Alexandre Julliard dfa3c68854 gdi32: Don't modify the DC arc direction in AngleArc.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-20 20:06:39 +09:00
Alexandre Julliard 4ea7190361 gdi32: Keep track of the last move position in a path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-20 20:06:39 +09:00
Alexandre Julliard 3c63993f7e gdi32: Add path helper functions to add points and close figures.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-20 20:06:39 +09:00
Michael Stefaniuc 27f80dab77 gdi32/tests: Compare RECTs with EqualRect instead of memcmp.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-20 20:06:39 +09:00
Alexandre Julliard ef3494c623 gdi32: Implement AngleArc in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 22:27:49 +09:00
Alexandre Julliard b06e6147d1 gdi32: Implement PolyDraw in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 22:27:49 +09:00
Alexandre Julliard 1f004c42bf gdi32: Add a few helper functions to manipulate point arrays in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 22:27:49 +09:00
Alexandre Julliard 91ef88a9e3 gdi32: Implement PolylineTo in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 14:00:17 +09:00
Alexandre Julliard e92e5ec376 gdi32: Implement ArcTo in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 13:51:05 +09:00
Alexandre Julliard 7cfcd23878 gdi32: Take the transform rotation into account to compute pen width.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:20 +09:00
Alexandre Julliard 04e7215faf gdi32: Remove the no longer needed (and broken) null driver implementation of some path functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:20 +09:00
Alexandre Julliard b5cf73edd9 gdi32: Implement FillPath, StrokeAndFillPath and StrokePath in the DIB driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:20 +09:00
Alexandre Julliard 7373a7c71d gdi32: Fix PathToRegion and SelectClipPath behavior with an empty path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-16 01:21:47 +09:00
Alexandre Julliard bd53a012b4 gdi32/tests: Add a few more path tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-16 00:25:34 +09:00
Huw Davies 078f192c66 gdi32: Rename the struct representing an embedded WMF in an EMF.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:25:16 +09:00
Huw Davies 19d1416cef gdi32: If the WMF was created by GetWinMetaFileBits() then return the original EMF.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:25:16 +09:00
Huw Davies 7be1c53d82 gdi32: Rename the struct representing an embedded EMF in a WMF.
Also, use an array rather than a pointer to represent the start of the data.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 23:08:00 +09:00
Alexandre Julliard d341b0c381 user32: Completely free owned DCEs when the corresponding window/class is destroyed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-21 09:55:03 +09:00
Andrey Gusev 9a80284e1a gdi32: Fix a typo in a pointer name in primitive_funcs.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-19 23:42:23 +09:00
Andrey Gusev 6fae520e1c gdi32/tests: Fix a typo in trace() message.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-02 12:27:18 +09:00
Piotr Caban dfb750b9c2 gdi32/enhmfdrv: Don't update document bounds in PolyPolyline within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:44 +09:00
Piotr Caban 67e26bec8d gdi32/enhmfdrv: Don't update document bounds in Polyline within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:44 +09:00
Piotr Caban 0d84feaf49 gdi32/enhmfdrv: Don't update document bounds in RoundRect within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:44 +09:00
Piotr Caban 661bc10bfe gdi32/enhmfdrv: Don't update document bounds in Ellipse within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:44 +09:00
Piotr Caban c36f365329 gdi32/enhmfdrv: Don't update document bounds in Arc/Chord/Pie within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:44 +09:00
Piotr Caban d307bba0f4 gdi32/enhmfdrv: Add enhanced metafile bounds tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban c019c68b45 gdi32/enhmfdrv: Don't update document bounds in LineTo within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban 44f860daff gdi32/enhmfdrv: Don't update document bounds in Rectangle within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban 3a12eb2083 gdi32/enhmfdrv: Add ExtTextOut tests with unmatched BeginPath/EndPath calls.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban 269b2519a7 gdi32/enhmfdrv: Always set ExtTextOut bounding rect if we're not inside path bracket.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban a3e741fd4c gdi32/enhmfdrv: Fix PolyBezierTo bounding box computation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 20:02:43 +09:00
Piotr Caban d9e7c4d820 gdi32/enhmfdrv: Don't drop viewport/window transformation in StretchBlt.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:35 +09:00
Michael Stefaniuc 4b7adc087a gdi32: Use wine_dbgstr_rect() to trace RECTs.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 18:42:02 +09:00
Piotr Caban 69e37ff05e gdi32: Use advanced graphics mode when setting world transform in PlayEnhMetaFileRecord.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 18:26:52 +09:00
Francois Gouget bf5508f9e0 gdi32/tests: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 21:30:22 +09:00
Huw Davies ef34222131 gdi32/tests: Allocate the font enum data structures.
These are in excess of 250kB and may overflow the stack.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-14 19:26:11 +09:00
Henri Verbeet 0a41694b53 gdi32: Implement DC creation from pre-existing memory.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:07 +09:00
Huw Davies bb4ead4c7c gdi32: Use abs() on an integer argument to avoid a clang warning.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 21:00:52 +09:00
Huw Davies 66351b3de3 gdi32: Implement playback of the GradientFill EMF record.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-08 23:01:38 +09:00
Huw Davies ac0959cdf6 gdi32: Implement recording of the GradientFill EMF record.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-08 23:01:28 +09:00
Nikolay Sivov 4161f5120b gdi32: Increase first gdi handle value.
Due to 32->16bit handle truncation low enough handle values could be
misinterpreted as stock brushes indices in FillRect().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-08 23:00:58 +09:00
Jactry Zeng 5bf4345824 gdi32: Load system fonts on Android.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 17:08:30 +09:00
Alexandre Julliard 1eac54ef7d gdi32: Take into account the fontdir directory specified at build time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-17 19:44:01 +09:00
Huw Davies a36b4a6abb gdi32/tests: Add tests for EMF PolyPolyline record creation.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-09 21:22:34 +09:00
Huw Davies 6e05189ba4 gdi32: Don't update the bounds if any poly{line|gon} has fewer than two points.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-09 21:22:32 +09:00
Huw Davies 2e4a37f2cf gdi32: Generate EMR_POLYPOLY{LINE|GON}16 records if the co-ords fit.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-09 21:22:28 +09:00
Michael Stefaniuc a23038217d gdi32/tests: Use SetRectEmpty() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-04 18:43:04 +09:00
Nikolay Sivov 4b05cac391 gdi32: Use a macro instead of accessing FT_Face flags directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 19:20:50 +09:00
Alexandre Julliard 0bbeaae678 make_unicode: Mark most data tables as hidden.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Alistair Leslie-Hughes bd571e7d1d gdi32/tests: Add tests for GetPath using metafile.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:24:17 +09:00
Alistair Leslie-Hughes 9ac1744b80 gdi32/tests: Check values returned from GetPath.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-19 19:59:07 +09:00
Charles Davis c94336f381 gdi32: Declare our intent explicitly to the compiler.
Clang warns about this abs(3) call because the argument is of unsigned
type.

Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 02:06:11 +09:00
Nikolay Sivov 932838faa3 gdi32: Only REG_SZ and REG_MULTI_SZ types make sense for font replacement, ignore the rest.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:06:54 +09:00
Nikolay Sivov 10437c027f gdi32/tests: Simplify tests using todo_wine_if().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:17:28 +09:00
Nikolay Sivov c98f40e227 gdi32: Fix otmfsSelection to have bold style set in case of bold simulation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:40:28 +09:00
Nikolay Sivov 11be16ca79 gdi32/tests: Turn some asserts in font tests into regular tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 23:27:16 +09:00
Nikolay Sivov 6389f41135 gdi32: Fix otmfsSelection to have italic style set in case of oblique simulation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 23:27:13 +09:00
Alexandre Julliard 232dc29ff8 make_unicode: Update vertical orientation table to the latest version.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 17:23:31 +09:00
Akihiro Sagawa a8d426e93a gdi32: Implement synthesizing bold glyphs for bitmap fonts.
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>
2016-01-15 23:49:54 +09:00
Akihiro Sagawa ba79c19d09 gdi32: Return an boolean value whether synthesizing bold glyph is success.
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>
2016-01-15 23:49:49 +09:00
Akihiro Sagawa 34e7361790 gdi32: Fix the advance width in synthetic bold glyphs with scaling.
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>
2016-01-15 23:49:43 +09:00
Akihiro Sagawa f0831ecd2f gdi32: Add a helper function to calculate the glyph advance metric.
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>
2016-01-15 23:49:39 +09:00
Akihiro Sagawa 79ab7456ed gdi32: Fixup the internal ntmFlags for bitmap fonts.
The value is used not for APIs, but for our fake-bold implementation.

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>
2016-01-05 11:48:47 +01:00
Akihiro Sagawa 37fdc50097 gdi32/tests: Add font advance tests for synthetic bold face with scaling.
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>
2016-01-05 11:48:44 +01:00
Akihiro Sagawa 6cd42f3df7 gdi32/tests: Refactor test_fake_bold_font() to avoid code duplications.
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>
2016-01-05 11:48:41 +01:00
Nikolay Sivov 1aa53bc470 gdi32: Initialize 'param' field (Coverity).
For consistency with the rest of the code, initialize both
'free' and 'param' fields.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-22 10:46:35 +01:00
Andrey Melnikov d4d304f436 gdi32: Handle NULL filename in GetICMProfileA().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Andrey Melnikov <temnota.am@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 18:18:45 +01:00
Nikolay Sivov f0223182af gdi32/tests: Some tests for GetICMProfile().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-15 09:12:40 +01:00
Alexandre Julliard eddc4609ec gdi32: Fix StretchDIBits color mapping for monochrome bitmaps without a color table.
This is the equivalent of df924f6a8c for
the StretchDIBits case.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-04 21:56:20 +09:00
Alexandre Julliard 89f12fc101 gdi32: Periodically flush a window surface if the app is continuously painting.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-27 20:53:31 +09:00
Sebastian Lackner a1790df348 gdi32: Add check for NULL pointer in dibdrv_wglDescribePixelFormat.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-26 23:57:49 +09:00
Nikolay Sivov 0e92f07f41 gdi32/tests: Some empty string tests for GetTextExtentPoint.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-16 17:09:31 +09:00
Qian Hong e50cd3b06b gdi32: Initialize system font link registry.
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-09 23:10:06 +09:00
Huw Davies 3d58c354ae gdi32: Take into account the mask's offset.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 21:11:26 +09:00
Anton Baskanov 18dc14ed9a gdi32: Return default palette entries from GetSystemPaletteEntries for non-palette-based devices.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 19:19:09 +09:00
Dmitry Timoshkov d774442e8d gdi32: Fix heap corruption.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 00:25:34 +09:00
Sebastian Lackner 04bd68409a gdi32: Use RtlIsCriticalSectionLockedByThread to check lock owner.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-11 13:47:40 +09:00
Nikolay Sivov 819d36786e gdi32: Improve structure layout of data returned by GetFontRealizationInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-09 13:00:32 +09:00
Aric Stewart fc94e5dd5f gdi32/tests: Mark Hebrew stock font test as different, like Arabic.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
2015-10-06 00:01:56 +09:00
Michael Müller cde2fbb08e gdi32: Make BitBlt and StretchDIBits hotpatchable.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-05 22:27:13 +09:00
Nikolay Sivov 6f7dfe2cea gdi32: Implement GetFontFileInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2015-10-05 22:27:11 +09:00
Aric Stewart 781b88b7c5 gdi32/tests: Expand tests skipped in Arabic to also skip in Hebrew.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
2015-10-01 23:29:57 +09:00
Nikolay Sivov 7f4c158a39 gdi32: Return font ids from GetFontRealizationInfo(). 2015-10-01 23:00:24 +09:00
Ken Thomases a05cdaa1b8 gdi32: Antialias fake bold or italic fonts regardless of GASP table.
If the client requests a bold typeface of a font which doesn't actually provide
a bold typeface, Wine fakes it using FT_Outline_Embolden().  Likewise, it fakes
italic by apply a shear transform.

These techniques work passably when antialiasing is in effect.  However, when
antialiasing is disabled at small sizes by the font's GASP table, the results
are horrible.  The glyphs have many spurs or appear furry.

On the theory that fonts disable antialiasing via the GASP table at small sizes
because hinting should produce pixel-perfect results and that that rationale is
voided by the application of procedural bolding or italicizing, we ignore the
GASP table and always antialias for fake bold or italic fonts.

There is a new registry setting to disable this and revert to the previous
behavior:

[HKEY_CURRENT_USER\Software\Wine\Fonts]
"AntialiasFakeBoldOrItalic"="n"

Signed-off-by: Ken Thomases <ken@codeweavers.com>
2015-10-01 16:31:54 +09:00
Nikolay Sivov af5884ffe5 gdi32/freetype: Handle fonts with broken usWinDescent values. 2015-10-01 16:29:40 +09:00
Nikolay Sivov efb8afcfdc gdi32/tests: Avoid excessive traces for fonts with OS/2 version 4 tables. 2015-09-11 16:05:23 +09:00
Alexandre Julliard 58fe3afff5 gdi32: Add an intermediate pointer to avoid a compiler warning. 2015-09-10 19:47:24 +09:00
Gerald Pfeifer 775de7922e gdi32: Avoid two cases of shift overflow in get_glyph_indices. 2015-09-08 15:10:59 +09:00
Alistair Leslie-Hughes 8348c0ebe0 gdi32/tests: Add enhanced metafile GetPath test. 2015-09-01 21:12:10 +09:00
Nikolay Sivov 7889b17425 gdi32: Added GetFontRealizationInfo() export. 2015-09-01 19:28:16 +09:00
Nikolay Sivov adb0f582e0 gdi32/tests: Add names to data structure GetFontRealizationInfo returns, explicitly test with older variant fields. 2015-09-01 19:27:20 +09:00
Huw Davies 5021e91940 gdi32/tests: 64-bit GetFontFileInfo may fail with error ERROR_NOACCESS. 2015-08-20 20:35:20 +09:00
Huw Davies 76c321d5e6 gdi32: Add tests for GetFontRealizationInfo, GetFontFileInfo and GetFontFileData. 2015-08-17 14:52:15 +09:00
Francois Gouget f8a7d6ed74 Assorted spelling fixes. 2015-08-07 23:50:48 +09:00
Daniel Lehman 22c51eeabf gdi32: Check for NULL pointer in GetOutlineTextMetrics. 2015-07-28 13:41:46 +02:00
Dmitry Timoshkov 50b6b376cb gdi32: EnumFontFamilies should enumerate substituted fonts only when directly asked for. 2015-07-17 19:29:10 +09:00
Dmitry Timoshkov 5289c9fd92 gdi32: Add a test for enumerating substituted fonts.
EnumFontFamilies(NULL) should not enumerate substituted fonts,
but EnumFontFamilies("MS Shell Dlg") should do.
2015-07-17 19:28:32 +09:00
Jactry Zeng c015447d07 gdi32: Add multiple font replacement support. 2015-07-17 16:40:29 +09:00
Jactry Zeng cb59350ed9 gdi32: Add a helper to map font replacement. 2015-07-17 16:40:29 +09:00
Nikolay Sivov d5c9a8a57a gdi32: Clarify offsets and sizes in vdmx table lookup code. 2015-06-30 14:36:41 +09:00
Nikolay Sivov 7ebdd58556 gdi32: Add a separate helper to load FT_Short values (Coverity). 2015-06-29 19:07:45 +09:00
Nikolay Sivov 885394bb0a gdi32/freetype: Properly handle loading of FT_Long-sized types (Valgrind). 2015-06-22 19:16:48 +09:00
Huw Davies c81ff0f8cf gdi32/tests: Japanese Win 7 uses MS Shell Dlg as its default GUI font. 2015-06-19 20:14:38 +09:00
Huw Davies 002cf965e1 gdi32/tests: Fix Courier test on Arabic locales. 2015-06-18 21:41:02 +09:00
Nikolay Sivov ce58518c6e gdi32: Return GCP_USEKERNING if font has kerning pairs support. 2015-06-08 15:29:53 +09:00
Thomas Faller 9244cac3af gdi32: Prevent unneeded operations by flag check. 2015-06-04 15:57:41 +09:00
Huw Davies 0c1f329053 gdi32: Prevent the underline / strikeout width getting rounded to zero. 2015-05-19 19:24:43 +09:00
Francois Gouget 150d920310 gdi32/tests: Silence some font traces that generate too many lines. 2015-05-11 15:19:04 +09:00
Patrick Rudolph d2a91a3aed gdi32: Add stub functions. 2015-04-17 17:32:46 +09:00
Bruno Jesus 5c323a540c gdi32: Support negative count values in GetBitmapBits. 2015-04-08 16:23:49 +09:00
Thomas Faber 8a390c8661 gdi32: Avoid uninitialized variable use in EnumEnhMetaFile (MSVC). 2015-03-30 20:05:16 +09:00
Michael Stefaniuc 8293cf33e0 gdi32: Remove double parentheses, not a misplaced pair (PVS-Studio). 2015-03-06 20:32:00 +09:00
Alexandre Julliard 336be2f694 gdi32: Use shorter constants for byte and word masks to avoid warnings. 2015-03-04 21:50:35 +09:00
Michael Müller e618ab65ed gdi32: Fix arguments for OSMesaMakeCurrent when using 16 bit formats. 2015-02-26 20:10:08 +09:00
Thomas Faber 656bc70f80 gdi32/tests: Avoid variable length arrays (MSVC). 2015-02-17 22:28:14 +09:00
Ken Thomases e9c36154e3 gdi32: Change an ERR to a WARN for fonts with too-long names.
The situation is commonplace on Macs and benign.
2015-02-16 19:18:39 +09:00
Aric Stewart ecbda5686d gdi32: Do not install fonts with a family name that is too long. 2015-01-20 16:34:22 +01:00
Nikolay Sivov 88202b3d9b gdi32: Remove some useless returns. 2014-12-15 13:40:27 +01:00
Michael Stefaniuc 80218d19ef gdi32/tests: Don't clear a variable before it goes out of scope (PVS-Studio). 2014-11-28 17:04:21 +01:00
Nikolay Sivov 0c507a1768 gdi32: Clarify read length values used with get_font_data(). 2014-11-26 17:35:14 +01:00
André Hentschel d83ae0ef40 gdi32: Remove unused function (Clang). 2014-11-25 19:49:36 +01:00