Commit Graph

556 Commits

Author SHA1 Message Date
Haoyang Chen bf92d6bedf gdiplus: Avoid filtering of special characters.
Symbols such as ←  should also be displayed.

Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 43e2563f44)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-10 00:11:26 +02:00
Ziqing Hui c509060f52 gdiplus: Support StringFormatNoWrap for GdipMeasureString.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 10:59:32 +02:00
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
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
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 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 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
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 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 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 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