Commit Graph

544 Commits (34aa117278a01bddb53ee4e3cc9f003a1859a3a4)

Author SHA1 Message Date
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
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 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
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
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
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
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
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 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
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
Alexandre Julliard a22d613321 gdiplus: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 08:32:33 +02:00
Nikolay Sivov 062411d69d gdiplus: Fix input string tracing in GdipMeasureCharacterRanges().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-05 11:25:33 -05:00
Zhiyi Zhang cba24001e4 gdiplus: Avoid calling GdipFillPath() with an empty path.
There is no point filling an empty path. And an empty
path will cause SelectClipPath() used in brush_fill_path()
to return error.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-20 16:53:34 +02:00
Zhiyi Zhang 07cf5ed189 gdiplus: Report error for brush_fill_path().
Operation should be skipped if SelectClipPath() returns any
error. And we should report unexpected error to the caller.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-20 16:53:30 +02:00
Zhiyi Zhang 40ce1dd473 gdiplus: Fix a memory leak.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-19 20:50:24 +02:00
Nikolay Sivov 9ffc6e600e gdiplus: Only draw filled arrows with positive height.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-14 23:51:41 +02:00
Nikolay Sivov 3d8bd66511 gdiplus: Draw using actual point data for custom caps.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 19:41:15 +02:00
Nikolay Sivov cd228c2815 gdiplus: Fix the number of transformed points for round caps.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 19:41:11 +02:00
Nikolay Sivov 5436cfc9b6 gdiplus: Convert actually used points for anchored round caps.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 19:41:06 +02:00
Nikolay Sivov aad491b0cf gdiplus: Fix the number of transformed points for squared caps.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 19:41:00 +02:00
Vincent Povirk 989c29870f gdiplus: Optimize clip region transforms.
Testing shows that this affects behavior. Transforming a region turns
empty rectangles (with negative width or height) into non-empty
rectangles. If an empty rectangle is set, it's treated as non-empty
only when there is a world transform.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-07 11:48:00 -06:00
Nikolay Sivov ab31b59f45 gdiplus: Implement GdipSetImageAttributesNoOp.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-24 19:09:31 +02:00
Vincent Povirk 3558dea0bd gdiplus: Store the gdi32 clip region at Graphics creation time.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-04 21:56:04 +02:00
Vincent Povirk 31e4dede0f gdiplus: Store the gdi32 transform at Graphics creation time.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-04 21:56:00 +02:00
Francois Gouget cbacc556ec gdiplus: Add a trailing linefeed to an ERR() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 18:54:02 +02:00
Vincent Povirk b32c324378 gdiplus: Account for gdi32 transform in GdipSetClipHrgn.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 21:35:31 +02:00
Vincent Povirk 9e1c110585 gdiplus: Account for gdi32 transforms in text functions.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 21:35:30 +02:00
Vincent Povirk ac51280b1f gdiplus: Account for gdi32 transform in SOFTWARE_GdipDrawPath.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 21:35:28 +02:00
Vincent Povirk 6bf1b638cb gdiplus: Account for gdi32 transform in SOFTWARE_GdipDrawThinPath.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 07:34:39 +02:00
Vincent Povirk e127101122 gdiplus: Send paths to gdi32 in device coordinates.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 07:34:34 +02:00
Vincent Povirk 93e8507aea gdiplus: Account for gdi32 transform in GdipDrawImage.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 07:34:30 +02:00
Vincent Povirk be952527f2 gdiplus: Use SOFTWARE_GdipDrawPath with alpha hdc's.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 07:34:24 +02:00
Vincent Povirk 0914f626af gdiplus: Account for gdi transform in brush_fill_pixels.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 07:34:20 +02:00
Vincent Povirk 399fd55f5c gdiplus: Account for gdi transform in SOFTWARE_GdipFillRegion.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-30 19:51:26 +02:00
Vincent Povirk 016dc76ab2 gdiplus: Transform clipping region to gdi device coordinates.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-30 19:51:02 +02:00
Vincent Povirk cfa4f088ee gdiplus: Replace DPtoLP with an internal coordinate space constant.
This will allow us to temporarily remove gdi transforms later, without
affecting internal logic that accounts for them.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Vincent Povirk 5c12cede8d gdiplus: Check for invalid coordinate space in GdipTransformPoints.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Nikolay Sivov 42e5d2702e gdiplus: Use defined constants for wrap modes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 17:46:07 +02:00
Andrew Eikum 79ebd3f3bf gdiplus: Fix copy-paste typo.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:42:27 +09:00
Andrew Eikum aac33dab2a gdiplus: Implement transform matrix for line gradient brushes.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:54 +09:00
Piotr Caban 14bb8df8a5 gdiplus: Support GdipSetClipRegion in metafiles.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 11:14:44 +09:00
Andrew Eikum 1744277bee gdiplus: Implement stub for GdipGraphicsSetAbort.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 21:59:41 +02:00
Vincent Povirk 331a7af37a gdiplus: Fix a possible floating point exception in path gradients.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:10:06 +02:00
Fabian Maurer 400cfb0fd9 gdiplus: Avoid division by zero in SOFTWARE_GdipDrawThinPath.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:03:10 +02:00
Piotr Caban f9b881e30c gdiplus: Fix GdipGetVisibleClipBounds behavior on metafiles.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 21:04:27 +02:00
Piotr Caban de37cedb70 gdiplus: Add partial support for GdipFillPath on metafiles.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 21:04:25 +02:00