Commit Graph

83 Commits

Author SHA1 Message Date
Akihiro Sagawa 9f458df88c gdi32: Adjust destination coordinates in some special cases.
When the source rectangle needs to flip and it doesn't fit in the
source device area, the destination image is flipped but the
destination area isn't flipped.  GdiAlphaBlend doesn't support
mirroring, the above isn't applicable.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 13:55:14 +02:00
Akihiro Sagawa 566b92320c gdi32: Fix negative width/height handling in stretch bitblt family.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 13:55:05 +02:00
Akihiro Sagawa bdfbd32e85 gdi32: Use the helper function to order the points of a rectangle.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-12 09:48:29 +02:00
Huw Davies de9d224996 gdi32: Ignore the alpha channel for blits to DDBs too.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-06 21:48:49 +02:00
Alexandre Julliard 474f9ff1fa gdi32: Avoid having the source alpha channel interfere with color comparisons in GdiTransparentBlt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 11:43:50 +02:00
Alexandre Julliard c54b667e25 gdi32: Add support for DIBINDEX colors in 1-bpp blits.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:29:51 +01:00
Alexandre Julliard 89d31e42fc gdi32: Fix color conversion when blitting to 1-bpp by matching pixels instead of color values.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 21:07:46 +01:00
Alexandre Julliard c0b30432ea gdi32: Support PALETTEINDEX colors for 1-bpp DIB blits.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-27 20:09:02 +01:00
Huw Davies 0f2a776a59 gdi32: Convert a few uses of get_dc_ptr() to get_physdev_dc().
In these cases we have the PHYSDEV meaning we own the DC already.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies 199ca9258a gdi32: Access several more properties directly from the DC.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Huw Davies cf386b8b64 gdi32: Pass a DC pointer to get_mono_dc_colors().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:08 +09:00
Huw Davies f4bc213ce5 gdi32: Use an internal version of LPtoDP that takes a DC * where possible.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-18 19:38:14 +09:00
Huw Davies f5bffe0ef7 gdi32: Use the get_mono_dc_colors() helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +09:00
Huw Davies 3d58c354ae gdi32: Take into account the mask's offset.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 21:11:26 +09:00
Michael Müller cde2fbb08e gdi32: Make BitBlt and StretchDIBits hotpatchable.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-05 22:27:13 +09:00
Alexandre Julliard 58fe3afff5 gdi32: Add an intermediate pointer to avoid a compiler warning. 2015-09-10 19:47:24 +09:00
Alexander Almaleh 8762842cd3 gdi32: Fix XFORM.eM22 calculation in PlgBlt. 2014-06-26 21:19:25 +02:00
Alexandre Julliard 6e325afaa7 gdi32: Handle a missing source alpha directly in the blend_rect primitive instead of modifying the source data. 2012-10-10 20:34:08 +02:00
Alexandre Julliard 76272e0773 gdi32: Use BI_BITFIELDS to indicate that a 32-bpp DIB doesn't have an alpha channel. 2012-10-10 20:34:08 +02:00
Alexandre Julliard 34b70728f3 gdi32: Limit the allocation size to the useful data when converting DIB bits. 2012-10-10 20:34:07 +02:00
Alexandre Julliard e95cff0332 gdi32: Always update the DC before looking for the physdev pointer. 2012-09-20 21:07:04 +02:00
Alexandre Julliard 6d23f3e7e1 gdi32: Keep the source DC locked until the end in StretchBlt and AlphaBlend. 2012-05-31 15:33:12 +02:00
Alexandre Julliard 1416d0e6f1 gdi32: Remove the bitmap parameter from the Get/PutImage entry points. 2012-05-29 21:05:52 +02:00
Alexandre Julliard df924f6a8c gdi32: Fix StretchBlt color mapping for monochrome bitmaps without a color table. 2012-05-29 18:17:22 +02:00
Alexandre Julliard 41e5bc06d8 gdi32: Add support for clipping source coordinates to the DC device rectangle. 2012-04-30 22:47:35 +02:00
Alexandre Julliard b1ccff1a9c gdi32: Add helper functions for manipulating bounds rectangles. 2012-04-16 13:41:29 +02:00
Alexandre Julliard 7e9d5a1771 gdi32: Negative destination sizes are allowed after coordinate mapping in GdiAlphaBlend. 2012-01-18 16:03:36 +01:00
Alexandre Julliard ccfbcfaf53 gdi32: Calculate the image size in GradientFill only once we have the correct bit count. 2012-01-02 21:46:46 +01:00
Alexandre Julliard 9f410413a6 gdi32: Implement GetPixel in the null driver using GetImage. 2011-12-13 14:00:05 +01:00
Alexandre Julliard d353c95d47 gdi32: Add a flag to request a default color table from init_dib_info. 2011-12-12 15:50:33 +01:00
Alexandre Julliard 82e1a4616c gdi32: Make sure that biSizeImage always contains the correct size in internal BITMAPINFO structures. 2011-12-10 13:35:59 +01:00
Alexandre Julliard 72fae39ce0 gdi32: Add missing check for empty visible rects in the non-stretching case. 2011-12-08 18:00:00 +01:00
Alexandre Julliard 1e2dd7cad8 gdi32: Add a helper function to clip a rectangle to the DC visible rect. 2011-12-06 15:50:59 +01:00
Alexandre Julliard 360d4bc548 gdi32: Use the DIB engine and PutImage for the null driver triangular gradient implementation. 2011-12-05 17:19:32 +01:00
Alexandre Julliard 4c6807199e gdi32: Use the DIB engine and PutImage for the null driver rectangular gradient implementation. 2011-11-30 12:59:11 +01:00
Alexandre Julliard bfb41db3a2 gdi32: Set the mono color map in BitBlt also for the initial PutImage attempt. 2011-11-04 13:24:03 +01:00
Alexandre Julliard bb21ac85b3 gdi32: Add a helper function to copy BITMAPINFO structures to avoid copying uninitialized data. 2011-10-27 14:19:44 +02:00
Huw Davies a01844b013 gdi32: Make the convert_bits and stretch_bits helpers external. 2011-10-17 17:45:08 +02:00
Huw Davies 64f6e9bc58 gdi32: Move the intersection of vis rects into a separate function. 2011-10-17 17:45:08 +02:00
Alexandre Julliard bfdac3e885 gdi32: Add a fall back implementation of BlendImage using client-side blending. 2011-10-17 17:45:05 +02:00
Alexandre Julliard b7a15ae7fa gdi32: Overlapping rectangles are not allowed in GdiAlphaBlend. 2011-10-14 20:26:43 +02:00
Alexandre Julliard 8f4d50ea4b gdi32: Add an all-one alpha channel when converting a DIB for blending. 2011-10-12 20:52:46 +02:00
Huw Davies a7b5d86655 gdi32: Add a helper to retrieve the bounding rectangle. 2011-10-11 15:43:18 +02:00
Alexandre Julliard 2adcb2b94a gdi32/tests: Add tests for GdiAlphaBlend with source alpha. 2011-10-11 13:37:42 +02:00
Alexandre Julliard 7029559ed6 gdi32: Avoid rounding errors with visible rectangles in mirroring blits. 2011-09-23 14:17:05 +02:00
Alexandre Julliard 514b006df2 gdi32: Force colors to black and white for 1-bpp source in AlphaBlend. 2011-09-20 16:21:40 +02:00
Alexandre Julliard c819e4bdea gdi32: Add a null driver fallback for AlphaBlend, using a new BlendImage driver entry point. 2011-09-14 11:57:45 +02:00
Alexandre Julliard 27516babd6 gdi32: Add a couple of helper functions for converting and stretching DIBs. 2011-09-14 11:25:19 +02:00
Alexandre Julliard 7696168dce gdi32: Add a placeholder function for DIB stretching. 2011-09-14 11:17:02 +02:00
Alexandre Julliard 497c3982b6 gdi32: Move coordinate checks into the common part of GdiAlphaBlend. 2011-09-13 17:17:52 +02:00