Commit Graph

2048 Commits

Author SHA1 Message Date
Haoyang Chen 2697b74d67 gdiplus: Fix texture brush rotation.
Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 10:42:03 +02:00
Michael Stefaniuc 812eb3c41d gdiplus: Remove superfluous cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 21:35:01 +02:00
Michael Stefaniuc 4e9ad7b305 gdiplus/tests: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:02:08 +02:00
Pengpeng Dong 36e6ea9767 gdiplus: Initialize the dead point coordinates in "GpPointF, *ptf" to 0.
Signed-off-by: Pengpeng Dong <dongpengpeng@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:25:25 +02:00
Haoyang Chen bccd754966 gdiplus: Implement GdipEnumerateMetafileSrcRectDestRect.
Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:25:09 +02:00
Esme Povirk 6a5eed549d gdiplus/tests: Don't test point type array padding.
Since the point types are an array of bytes, padded to a DWORD
boundary, some of the bytes at the end are undefined, and there's
no good reason to test them.

Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-17 10:43:52 +02:00
Jiajin Cui 5754bd9c0a gdiplus: Make gdi_alpha_blend fallback to StretchBlt if current Compositing Mode is SourceCopy.
Signed-off-by: Jiajin Cui <cuijiajin@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 21:16:49 +02:00
Shawn M. Chapla 52fa4fb74e gdiplus: Implement GdipGetClipBoundsI in terms of GdipGetClipBounds.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 21:25:39 +02:00
Shawn M. Chapla 5e40198862 gdiplus/tests: Add cursory GdipGetClipBoundsI checks to graphics clipping test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 21:25:39 +02:00
Shawn M. Chapla c155b043fd gdiplus: Add missing allocation failure checks to graphics functions.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 21:25:39 +02:00
Shawn M. Chapla 1f8e40e461 gdiplus: Remove outdated FIXME comment about compositing mode.
Removes an outdated comment about graphics compositing mode being
unused. Graphics compositing mode has been used in pixel blending since
a16a4d97.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 21:25:39 +02:00
Shawn M. Chapla 03e9de4920 gdiplus: Incorporate GDI frame into metafile auto-frame before scaling.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 23:18:54 +02:00
Shawn M. Chapla 14bf19ec5e gdiplus/tests: Add metafile null frame rect GDI/GDI+ interop test case.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 23:18:52 +02:00
Jeff Smith 82eb0a66a2 gdiplus: Avoid a few unnecessary calculations for arc2polybezier.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:06:53 +02:00
Shawn M. Chapla 7c2d5d40e5 gdiplus/tests: Fix 'LogicalDpiY' typos in metafile tests.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-29 11:24:26 +02:00
Shawn M. Chapla d3de57c2b3 gdiplus: Use FromRect constructor in LinearGradientBrush deserialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:16:53 +02:00
Shawn M. Chapla 6c787852c4 gdiplus: Fix LinearGradientBrush deserialization off-by-one errors.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:16:51 +02:00
Shawn M. Chapla 60fd827d8b gdiplus: Add LinearGradient brush object serialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:16:49 +02:00
Shawn M. Chapla 6c57cf5eee gdiplus/tests: Add metafile LinearGradient brush test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:16:36 +02:00
Shawn M. Chapla 1cb437ac25 gdiplus: Add FillRegion serialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:18:22 +02:00
Shawn M. Chapla 8191ed86ca gdiplus: Add FillRegion record deserialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:18:19 +02:00
Shawn M. Chapla 5ccd10fce8 gdiplus/tests: Add metafile FillRegion test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:18:17 +02:00
Jiajin Cui f992bc77c8 gdiplus: Fix crash if failed to create bitmap.
Signed-off-by: Jiajin Cui <cuijiajin@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:17:50 +02:00
Shawn M. Chapla a9151e2e2b gdiplus: Use GenericFontFamilySansSerif when missing deserialized font family.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 11:44:42 +02:00
Shawn M. Chapla fcc21dbf48 gdiplus/tests: Add metafile unknown font deserialize test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 11:44:37 +02:00
Shawn M. Chapla 71bb5cd52a gdiplus: Add DrawDriverString serialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 13:25:08 +02:00
Shawn M. Chapla 30c7fe69e0 gdiplus: Add DrawDriverString record deserialization.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 13:25:08 +02:00
Shawn M. Chapla 04d536267e gdiplus: Set font emSize to height minus internal leading.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codewevers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 20:06:37 +02:00
Shawn M. Chapla bfc8404041 gdiplus/tests: Add additional logfont size tests.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codewevers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 20:06:37 +02:00
Shawn M. Chapla 313c27ad2a gdiplus: Make brush parameter const in brush object serialize helpers.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:42:15 +02:00
Shawn M. Chapla b1f2432505 gdiplus/tests: Add metafile DrawDriverString test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:42:10 +02:00
Shawn M. Chapla b0f6650452 gdiplus: Set GDI world xform to the identity xform on acquisition.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00
Shawn M. Chapla 83034c9496 gdiplus/tests: Add GDI/GDI+ HDC constructed graphics interop test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:34 +02:00
Shawn M. Chapla 947b77215d gdiplus: Play all EMF records using PlayEnhMetaFileRecord.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:17:21 +02:00
Shawn M. Chapla 139c9be2ba gdiplus/tests: Add metafile playback test for EMR_RESTOREDC.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:17:19 +02:00
Shawn M. Chapla 34aa117278 gdiplus: Preserve temp DC state for bitmap backed graphics objects.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Shawn M. Chapla 739d0a1dfa gdiplus/tests: Add GDI/GDI+ graphics interop test.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Jeff Smith 11c68bb50e gdiplus/tests: Fix debug value in test_graphics_clear().
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Jeff Smith 47b0155f96 gdiplus: Simplify modulo 8 math used for rendering origin.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Jeff Smith da91507491 gdiplus: Handle rendering origin during hatch fill.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:34:59 +02:00
Jeff Smith 03cefac99b gdiplus/tests: Test that hatch fill uses rendering origin.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:34:56 +02:00
Jeff Smith 7bf86e0016 gdiplus: Handle additional hatch styles.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:55:56 +02:00
Jeff Smith d0c70facbd gdiplus: Fix hatch brush patterns that require anti-aliasing.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:55:53 +02:00
Jeff Smith a75584ec1b gdiplus: Fix most hatch brush patterns.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:55:50 +02:00
Jeff Smith 7735c11d69 gdiplus/tests: Test hatch brush patterns.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:55:46 +02:00
Jacek Caban cca639fa64 gdiplus: Introduce absdiff helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Jacek Caban 10257a9417 gdiplus/tests: Introduce compare_uint helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:24 +02:00
Vincent Povirk e41058243a gdiplus: Improve GdipSetMetafileDownLevelRasterizationLimit.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:09:44 +02:00
Vincent Povirk 6c06196497 gdiplus: Implement GdipGetMetafileDownLevelRasterizationLimit.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:09:41 +02:00
Vincent Povirk 606ba15ac5 gdiplus: Add tests for image palette size.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00