Commit Graph

2067 Commits

Author SHA1 Message Date
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
Vincent Povirk 8b9cff6e70 gdiplus: Return an error retrieving the palette for a metafile.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vincent Povirk ed2d0df4f7 gdiplus: Don't set a palette when loading non-indexed images.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vincent Povirk 3250a17e20 gdiplus: Support character offsets in GDI32_GdipDrawDriverString.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-08 13:34:23 +02:00
Jeff Smith 252a53825a gdiplus: Include palette when writing PNG indexed formats.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:50:43 +02:00
Jeff Smith f3c03ecb82 gdiplus/tests: Indicate which encoder failed when attempting to save image.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:50:38 +02:00
Dmitry Timoshkov 7eb1f5d6ad windowscodecs: Add initial implementation of the GIF encoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Jeff Smith 28dde825b3 gdiplus/tests: Use originating line when ok_path reports failures.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:35:24 +02:00
Jeff Smith fd15bd22c4 gdiplus: Use internal function to add bezier points for curve.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith 7ff16aff06 gdiplus: Reuse point when calling GdipAddPathArc on open figure.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith c5ae902946 gdiplus: Reuse point when calling GdipAddPathLine2 on open figure.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith f54bf06a2a gdiplus: Reuse point when calling GdipAddPathLine on open figure.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith a7e6cb4a25 gdiplus: Reuse point when calling GdipAddPathBeziers on open figure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48877
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith 1a3a8a0016 gdiplus: Reuse point when calling GdipAddPathBezier on open figure.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jeff Smith 93a5ce2445 gdiplus: Check that GdipAddPathLine2 is passed at least one point.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 22:04:07 +02:00
Jeff Smith efd5f670bd gdiplus: Clear new multi-point paths that end with Start.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 22:04:07 +02:00
Thomas Faber 65c72c93ce gdiplus/tests: Disable double-freeing test.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 11:48:32 +02:00
Jeff Smith 09630fc92e gdiplus: Handle some degenerate cases with GdipCreatePath2.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-10 17:38:50 +02:00
Jacek Caban af12270ac6 makefiles: Remove no longer needed explicit ucrtbase imports.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:52 +02:00
Jeff Smith 9f60413630 gdiplus: Widen-path for zero-width lines only emits anchors.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:42:17 +02:00
Jeff Smith 5eda570e6d gdiplus: Do not shrink UnitWorld lines below width 1.0.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:42:15 +02:00
Jeff Smith 0cc30160b7 gdiplus: Pass line-width parameter to widen-figure functions.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:42:12 +02:00
Jeff Smith fc45ffa89e gdiplus/tests: Add widen-path test for UnitWorld zero-width line.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:42:10 +02:00
Jeff Smith 260fb550be gdiplus: Caps are added at the end of a path.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 21:18:30 +01:00
Jeff Smith 15e8adfcfc gdiplus/tests: Add tests for multi-figure lines to test_widen_cap.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 21:18:27 +01:00
Vincent Povirk 689e94c597 gdiplus/tests: Don't test the exact substitution of MS Shell Dlg.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47872
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:20:43 +01:00
Vincent Povirk 861811254f gdiplus/tests: Don't test font face of DEFAULT_GUI_FONT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47872
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:20:41 +01:00
Damjan Jovanovic 99a171981c gdiplus: In CompositingModeSourceCopy, fully transparent pixels are drawn black.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42585
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:21:29 +01:00
Piotr Caban f65cca4de3 gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:49:56 +01:00
Piotr Caban c74d909e3b gdiplus: Fix gdi handles leak in GdipMeasureCharacterRanges.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:49:53 +01:00
Jeff Smith 0022b7a6cf gdiplus: Caps do not shrink for line width < 2.0.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 23:02:00 +01:00
Jeff Smith 2d4befd4bc gdiplus/tests: Add thin-line test to test_widen_cap.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 23:01:57 +01:00
Jeff Smith c147f8e3d7 gdiplus/tests: Use much smaller fudge factor in test_widen_cap.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 23:01:52 +01:00
Zhiyi Zhang 83e95a609c gdiplus: Fix a possible NULL pointer reference in GdipGetNearestColor().
Fix a regression from 5ca9da2c01.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48657
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 18:50:19 +01:00
Florian Will a7fc06f62c gdiplus: Implement GdipSaveAddImage() and GdipSaveAdd().
Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Florian Will 21b62920f6 gdiplus/tests: Add multi-page tiff file saving test.
Also move the get_encoder_clsid() helper to the top of the file so it
can be used by the new test.

Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:01:22 +01:00
Florian Will 483aaf3308 gdiplus: Add GdipSaveAddImage() stub.
Also update the GdipSaveAdd() stub to return NotImplemented instead of
silently failing.

Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:01:15 +01:00
Florian Will b31fc78812 gdiplus: Refactor to split up encode_image_wic().
New functions initialize_encoder_wic(), encode_frame_wic() and
terminate_encoder_wic() are useful for implementing GdipSaveAdd() and
GdipSaveAddImage() later.

The WIC encoder is now stored in the new GpImage "encoder" field instead
of a local variable. This makes it possible to keep the encoder active
between multiple gdiplus API calls, which is also useful for
GdipSaveAdd() and GdipSaveAddImage().

Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:01:05 +01:00
Jeff Smith bc49309fe2 gdiplus: Add LineCapDiamondAnchor path widening.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:54 +01:00
Jeff Smith 8e7c320df6 gdiplus: Add LineCapRoundAnchor path widening.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:54 +01:00
Jeff Smith 1da5cd6a8f gdiplus: Add LineCapSquareAnchor path widening.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:52 +01:00
Jeff Smith b3a68db9a0 gdiplus: Fix LineCapTriangle path widening.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:48 +01:00
Jeff Smith 26ffbf6b8c gdiplus: Fix LineCapRound path widening.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:43 +01:00
Jeff Smith eff15943ce gdiplus/tests: Test path widening on capped lines.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:00:38 +01:00
Jeff Smith ffd4bb2520 gdiplus: Each pen dash array element must be greater than zero.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 18:48:33 +01:00
Dmitry Timoshkov a99cad4ae7 gdiplus: Print fixme in GdipGetNearestColor only once.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 19:47:56 +01:00
Jeff Smith ddd88fe2f4 gdiplus: Round up when converting from 32-bit ARGB to PARGB.
Applies fix from d23bfd8dfc to
setpixel_32bppPARGB.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 19:47:33 +01:00
Jeff Smith 06bf4283fb gdiplus: Fix calculation for 32-bit PARGB to ARGB conversion.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 19:47:25 +01:00
Dmitry Timoshkov 5ca9da2c01 gdiplus: Make GdipGetNearestColor print FIXME only if indexed bitmap is associated with the graphics object.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Dmitry Timoshkov b9307cfa61 gdiplus: Create FontFamily objects only once for the FontCollection.
.Net 4.7+ depends on this behaviour and expects to be able to do pointer
equality tests for FontFamily objects.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:21:45 +01:00
Dmitry Timoshkov 2884da7ef7 gdiplus/tests: Add tests for FontFamily object management.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:21:43 +01:00
Dmitry Timoshkov cf6546fb3b gdiplus/tests: Add more tests for GdipCreateBitmapFromHBITMAP and palette images.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 18:27:17 +01:00
Dmitry Timoshkov 506f3bf53d gdiplus: Reimplement GdipCreateBitmapFromGdiDib by using GdipCreateBitmapFromHBITMAP.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 18:27:14 +01:00
Dmitry Timoshkov 619ef41f33 gdiplus: GdipCreateBitmapFromHBITMAP should use palette from the GDI bitmap.
This patch fixes painting bitmaps with bpp <= 8.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 18:27:07 +01:00
Dmitry Timoshkov b7ca0bc043 gdiplus: If the font unit is not pixels scaling should not be applied.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Jeff Smith 1802ca5e34 gdiplus: Calculate centroid of path as default center of path gradient.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Jeff Smith 3a092fb616 gdiplus/tests: Add another GdipGetPathGradientCenterPoint test.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Alistair Leslie-Hughes 14adcc694d gdiplus: Check status as well before using bitmap.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 19:41:03 +01:00
André Hentschel 76fea3a990 gdiplus: Fix some spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:58:06 +01:00
Damjan Jovanovic 3c8784bf9c gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.
All sample code in the Python Pyglet library suffers from terrible
text corruption, caused by the inability to erase the background
between rendering sequential font glyphs, resulting in leftovers
from previous letters mixing with the image of new letters.

This is because it attempts to erase the background by calling
GdipGraphicsClear() with ARGB color 0x00000000 (completely
transparent black), and in our gdiplus alpha blending that into
the background has no effect. It should be using
CompositeModeSourceCopy to overwrite the background with that brush
instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 21:01:59 +01:00
Damjan Jovanovic a16a4d9757 gdiplus: Start implementing CompositingModeSourceCopy.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 21:01:59 +01:00
Nikolay Sivov 9d123b5424 gdiplus: Trace GpRectF arguments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:56:07 +02:00
Francois Gouget 0bbc9b830e gdiplus: Fix a function name in a FIXME() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 22:58:42 +02:00
Nikolay Sivov 88207f0c11 gdiplus: Add GdipRecordMetafileStreamI().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:03:44 +02:00
Jacek Caban d9fb92c864 gdiplus: Build with ucrtbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Alexandre Julliard a22d613321 gdiplus: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 08:32:33 +02:00
Louis Lenders 89c1f51151 gdiplus: Add version resource.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47137
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:35:28 +02:00
Michael Stefaniuc 5d2aa1eebd gdiplus: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:50:16 +01:00
Michael Stefaniuc 50032f4e14 gdiplus: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Vincent Povirk e2f37558a7 gdiplus: Add support for reading nested metafiles.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:28:27 +01:00
Michael Stefaniuc 241335cea2 gdiplus: Remove redundant not-NULL checks (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:21:15 +01:00
Sven Baars 6a6376cd83 gdiplus/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:21:09 +01:00
Dmitry Timoshkov b7aa42c008 gdiplus/tests: Add some tests for GdipInitializePalette.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Dmitry Timoshkov cbc486aca1 gdiplus: Implement GdipInitializePalette.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Sven Baars 5f25d7a9a9 gdiplus/tests: Add some font family pointer tests.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00
Sven Baars 85630593b8 gdiplus: Fix a memory leak on error path (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 10:29:00 +01:00
Sven Baars a6d9fe0b0f gdiplus/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 23:52:09 +01:00
Nikolay Sivov a3ed938e4a gdiplus/tests: Add some missing return value checks (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-07 10:47:20 -06:00
Sven Baars 3d5036e317 gdiplus: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-19 22:13:44 +01:00
Nikolay Sivov bb2e09804d gdiplus: Remove unused brush fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 10:43:37 +01:00
Nikolay Sivov 0937186f7d gdiplus: Fix brush transform created with GdipCreateLineBrushFromRect().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 10:43:37 +01:00
Nikolay Sivov 6906117bc3 gdiplus: Add a helper to create gradient brush from rectangle.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 10:43:37 +01:00