Commit Graph

248 Commits

Author SHA1 Message Date
Esme Povirk a554079860 gdiplus: Implement reference counting for private font families.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50896
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:33:16 +02:00
Nikolay Sivov 2c77f717c8 gdiplus/metafile: Implement rendering origin recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 09:41:21 +02:00
Nikolay Sivov 42cb11b1c1 gdiplus/metafile: Implement SetClipPath() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 09:41:19 +02:00
Nikolay Sivov 24278c4fc7 gdiplus/metafile: Implement ResetClip() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 09:41:16 +02:00
Nikolay Sivov 33d2f6b7ec gdiplus/metafile: Implement TranslateClip() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 09:41:13 +02:00
Nikolay Sivov c17cd0fcab gdiplus/metafile: Implement DrawArc() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 21:02:45 +01:00
Nikolay Sivov beefe76c6f gdiplus: Add a helper to initialize RectF.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 21:02:43 +01:00
Nikolay Sivov 9b04f1c660 gdiplus/metafile: Implement FillPie() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 21:02:38 +01:00
Nikolay Sivov 81bbc4872e gdiplus/metafile: Implement DrawRectangles() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Nikolay Sivov 81b7555da8 gdiplus/metafile: Implement FillEllipse() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Nikolay Sivov 4e55ec2b9e gdiplus/metafile: Implement DrawEllipse() recording.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Ziqing Hui 3549097c9e gdiplus: Record logical DPI in metafile.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:20 +01:00
Ziqing Hui f40f379f05 gdiplus: Correctly handle UnitDisplay for printer DC.
For printer DC, UnitDisplay specifies that a unit is 1/100 inch,
which is different from display DC.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=17848
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 10:42:14 +01: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 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 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
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 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
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
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
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Nikolay Sivov 1da650a1cb gdiplus: Partially implement arrow 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-14 23:51:31 +02:00
Nikolay Sivov 8463159344 gdiplus: Use ARRAY_SIZE() macro.
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:27 +02:00
Michael Stefaniuc fb12076e1a gdiplus: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 18:45:27 +01: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
Nikolay Sivov aef2f0799f gdiplus/metafile: Implement EmfPlusRegion deserialization.
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-20 19:00:41 +02:00
Nikolay Sivov 9f45ef729c gdiplus/metafile: Partially implement EmfPlusPen support for playback.
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-20 19:00:35 +02:00
Nikolay Sivov 7b99fe6f09 gdiplus/metafile: Added support for EmfPlusFont objects.
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-18 09:44:14 +02:00
Nikolay Sivov 2a2f61dfe9 gdiplus/metafile: Partially implement EmfPlusPath deserialization.
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-16 21:00:10 +02:00
Nikolay Sivov 81459d6526 gdiplus/metafile: Implement EmfPlusImage deserialization for bitmaps.
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-16 21:00:05 +02:00
Nikolay Sivov ce315b9f86 gdiplus/metafile: Support solid brushes in EmfPlusRecordTypeObject record playback.
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-14 01:04:33 +02:00
Nikolay Sivov 825f393299 gdiplus/metafile: Implement EmfPlusRecordTypeObject for image attributes object.
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-12 19:40:48 +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
Hugh Bellamy c022c46613 gdiplus: Define GpHatchStyle.
Signed-off-by: Hugh Bellamy <hughbellars@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 18:44:34 +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 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
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
Piotr Caban a892b68016 gdiplus: Add write_path_data helper to create EMF+ path object.
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-19 20:53:37 +02:00
Vincent Povirk cfe2b3fa0e gdiplus: Don't require specific gdi+ versions in metafile structures.
Based on testing of manually edited metafiles, only the signature portion
of version fields are tested, not the version number.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +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 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 ac231b14b9 gdiplus: Add function for managing metafile objects id.
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
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
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 43e36d62a1 gdiplus: Simplify and standardize the heap_xxx() declarations.
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-02-27 10:14:09 +01:00
Piotr Caban 5673d82b8e gdiplus: GpBitmap can be only locked once, get rid of numlocks field.
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-02-16 08:30:46 +01:00
Piotr Caban 0eaaa15144 gdiplus: Make GpBitmap->bitmapbits access thread safe.
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-02-16 08:30:40 +01:00