Commit Graph

529 Commits

Author SHA1 Message Date
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
Piotr Caban 8608bf532e gdiplus: Add DrawPath stub for 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:17 +02:00
Piotr Caban 29968cfdc8 gdiplus: Support GdipSetInterpolationMode 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-07-12 19:51:56 +02:00
Piotr Caban f2483748eb gdiplus: Support GdipSetCompositingQuality 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-07-12 19:51:56 +02:00
Piotr Caban 1cecd47985 gdiplus: Support GdipSetCompositingMode 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-07-12 19:51:55 +02:00
Piotr Caban 910975a944 gdiplus: Support GdipSetSmoothingMode 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-07-12 19:51:55 +02:00
Piotr Caban f7160291df gdiplus: Support GdipSetPixelOffsetMode 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-07-11 20:55:19 +02:00
Piotr Caban 683315d111 gdiplus: Support GdipSetTextRenderingHint 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-07-11 20:55:15 +02:00
Piotr Caban e1e4dd2023 gdiplus: Add partial support for GdipDrawImagePointsRect on metafile.
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-10 20:51:11 +02:00
Vincent Povirk 6ec3cd9434 gdiplus: Set flatness more appropriately in GdipDrawPath.
If the path is going to be scaled before rendering, 1.0 does not make
sense as an error value.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-29 22:04:38 +02:00
Vincent Povirk b8a8e1bde9 gdiplus: Check SHADEBLENDCAPS only for printer devices.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 21:08:15 +02:00
Bruno Jesus 29a55bc4d1 gdiplus: Use software mode to draw semi-transparent lines when necessary.
Signed-off-by: Bruno Jesus <bjesus@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-03 22:58:02 +02:00
Nikolay Sivov c89de1dd08 gdiplus: Use better naming for line alignment format field.
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-04-28 18:40:13 +02:00
Nikolay Sivov 69b41e7cf3 gdiplus: Fix generic string formats behavior.
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-04-28 18:40:11 +02:00
Francois Gouget f870708c66 gdiplus: Make some GdipDraw*Path() functions static.
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-01-09 21:29:55 +01:00
Vincent Povirk 6920cf68e6 gdiplus: Reimplement GdipDrawPolygon based on GdipDrawPath.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-19 08:12:15 -07:00