Commit Graph

126 Commits

Author SHA1 Message Date
Nikolay Sivov 00fea0298b d2d1: Implement GetBounds() for path geometries.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Nikolay Sivov 0a315ba065 d2d1: Fix rounding when setting scissor rectangle.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-30 16:28:56 +02:00
Henri Verbeet 2187a1edb3 d2d1: Split overlapping bezier control triangles.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:04 +09:00
Henri Verbeet 00fafb27e3 d2d1: Implement bezier/bezier intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:59 +09:00
Henri Verbeet a4f23ea148 d2d1: Implement bezier/line intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:57 +09:00
Henri Verbeet 01d4767aed d2d1/tests: Add a test for bezier intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:53 +09:00
Nikolay Sivov c2257c072b d2d1: Enforce text antialias mode vs text rendering mode consistency.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:33 +02:00
Nikolay Sivov d6e2a6f370 d2d1/tests: Fix stroke style object leak (Valgrind).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-11 18:23:42 +02:00
Alistair Leslie-Hughes 4fc2dbb14a d2d1/tests: Use standard wine_dbgstr_longlong.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 13:57:15 +02:00
Henri Verbeet 4dcdc80ad5 d2d1: Fix the segment count for open figures.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:05 +02:00
Henri Verbeet 09ff685aa0 d2d1: Implement d2d_path_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:02 +02:00
Henri Verbeet 208eb09e3c d2d1: Implement d2d_transformed_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:54:59 +02:00
Henri Verbeet e5733e7cd4 d2d1: Implement d2d_rectangle_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:20 +02:00
Henri Verbeet 828e62c8e2 d2d1: Implement d2d_transformed_geometry_GetBounds().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:19 +02:00
Henri Verbeet 2485305b55 d2d1: Implement d2d_rectangle_geometry_GetBounds().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:17 +02:00
Henri Verbeet bc47dc3f41 d2d1: Implement d2d_layer_GetSize().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:15 +02:00
Henri Verbeet 6d638b9e28 d2d1: Implement d2d_d3d_render_target_CreateLayer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:13 +02:00
Henri Verbeet ee4280ef6c d2d1: Take the render target transform into account when evaluating flatness in vs_code_bezier_outline[].
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Henri Verbeet bd2141e521 d2d1: Implement initial support for quadratic bezier outlines.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Henri Verbeet 0be8d44665 d2d1: Create open, hollow geometry in d2d_d3d_render_target_DrawLine().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 08:55:55 +01:00
Henri Verbeet d7fb78184f d2d1/tests: Add tests for drawing simple shapes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 08:55:52 +01:00
Nikolay Sivov 93959d21e9 d2d1/tests: Test to show that WIC bitmap is locked within BeginDraw()/EndDraw().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-17 20:54:05 +01:00
Nikolay Sivov 74ed5c7067 d2d1: Added support for ID2D1GdiInteropRenderTarget interface.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-14 22:47:00 +01:00
Henri Verbeet a525b69781 d2d1: Properly invert join directions when needed.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 18:50:10 +01:00
Henri Verbeet d10dfd4102 d2d1: Take the source transformation into account when creating a transformed geometry.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet 7ed032a014 d2d1: Implement rectangle geometry outlines.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet 39406039c0 d2d1: Implement initial support for line joins.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet f3563f4e62 d2d1: Add an initial d2d_d3d_render_target_DrawGeometry() implementation.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Nikolay Sivov 621675e8f8 d2d1: Check for NULL pointer when releasing previous render target view.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 15:54:13 +01:00
Józef Kucia 89ffad1f20 d2d1/tests: Change scale factors in test_bitmap_brush().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-19 11:06:08 +01:00
Henri Verbeet e9fc8c7c52 d2d1: Properly test which side of a bezier curve is the inside.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Henri Verbeet 3d51a7164b d2d1/tests: Introduce a helper function to add quadratic bezier curves to a geometry sink.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Henri Verbeet a8dc7cc1d6 d2d1/tests: Introduce a helper function to add lines to a geometry sink.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Henri Verbeet 70e68e1234 d2d1/tests: Make the window client rect match the DXGI swapchain dimensions.
Similar to e.g. commit 65f20ffc50. There's
no compelling reason for the tests themselves, but it does simplify
debugging them a little.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Nikolay Sivov 463d1877ae d2d1: Fix GetGradientStops() when asked for more stops than collection has.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-25 19:48:52 +01:00
Nikolay Sivov caac983742 d2d1: Implement retrieving dash pattern data for stroke styles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-24 14:31:15 +01:00
Nikolay Sivov 786633e311 d2d1: Store stroke style properties, implement methods returning them.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 16:30:59 +01:00
Nikolay Sivov adfdfe79b2 d2d1/tests: Some tests for GetRect() and GetRoundedRect().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-09 16:32:48 +01:00
Nikolay Sivov 97e52ab673 d2d1: Implement FillContainsPoint() for rectangle geometry.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-03 17:13:40 +01:00
Nikolay Sivov c8eb7453a8 d2d1/tests: Test creating bitmap target from uninitialized dc target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-31 15:40:51 +01:00
Nikolay Sivov 7bce356ef4 d2d1/tests: DrawTextLayout() ignores effects that are not brushes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-31 15:40:49 +01:00
Andrew Eikum aea8f9d610 d2d1/tests: Add FillContainsPoint() tests.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-26 15:36:00 +02:00
Nikolay Sivov e9da184bbd d2d1: Initial implementation of bitmap render target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-20 06:17:39 -07:00
Nikolay Sivov 4121b223c8 d2d1: Implement GetDesktopDpi().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:57:47 +02:00
Nikolay Sivov 31b162b37d d2d1: Support shared bitmaps created from dxgi surface.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:51:35 +02:00
Nikolay Sivov 7d5bd929e2 d2d1/tests: Initial tests for bitmap render target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:11:34 +02:00
Nikolay Sivov f4cacf774b d2d1: Initial implementation of HWND render target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-04 13:55:27 +02:00
Nikolay Sivov 03d301cc74 d2d1: Initial implementation of DC render target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 22:24:31 +09:00
Nikolay Sivov ccc6a576d6 d2d1/tests: Test that target properties are kept during BindDC().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-08 19:51:28 +09:00
Nikolay Sivov 35bab5ce64 d2d1/tests: A DC target test for switching from one HDC to another.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-06 11:28:39 +09:00
Nikolay Sivov ea7df31319 d2d1/tests: Basic test for ID2D1DCRenderTarget creation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:53:45 +09:00
Nikolay Sivov a612af7772 d2d1/tests: A test for DrawTextLayout() with drawing effect.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 22:50:26 +09:00
Nikolay Sivov e2f9bc0d0b d2d1: SetDpi() rejects negative values too.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 01:26:17 +09:00
Nikolay Sivov d309b843fb d2d1: Block target creation on invalid dpi values.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 01:26:17 +09:00
Nikolay Sivov c05dd9e11f d2d1: Don't update target dpi if only one SetDpi() argument is zero.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 21:18:56 +09:00
Henri Verbeet ff6225c16d d2d1/tests: Add some tests for opacity brushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 00:24:35 +09:00
Henri Verbeet c575f04b68 d2d1: Properly check if a face is real in d2d_path_geometry_add_face().
In particular, the existing test may fail if the convex hull has only three
vertices.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-09 12:58:23 +09:00
Henri Verbeet acbb0bdfac d2d1: Implement d2d_factory_CreateTransformedGeometry(). 2015-08-20 20:26:41 +09:00
Henri Verbeet 2474f5e33a d2d1: Implement d2d_bitmap_CopyFromMemory(). 2015-08-18 18:28:49 +09:00
Henri Verbeet cd59e3db6c d2d1: Implement d2d_d3d_render_target_CreateSharedBitmap(). 2015-08-04 09:45:59 +02:00
Henri Verbeet c2135dd498 d2d1: Properly handle D2D1_ALPHA_MODE_PREMULTIPLIED on render targets. 2015-07-30 11:39:51 +02:00
Henri Verbeet 52c412492f d2d1: Bitmap values are always premultiplied in practice.
Since creating bitmaps with D2D1_ALPHA_MODE_UNKNOWN or
D2D1_ALPHA_MODE_STRAIGHT is not possible, and D2D1_ALPHA_MODE_IGNORE
behaves as if alpha == 1.0f.
2015-07-30 11:39:46 +02:00
Henri Verbeet 1b3574ebc0 d2d1: Validate bitmap formats. 2015-07-29 21:44:01 +02:00
Henri Verbeet b33786ce6d d2d1: Implement initial support for drawing bezier curves. 2015-07-20 11:50:20 +02:00
Henri Verbeet 025c320145 d2d1: Implement d2d_geometry_sink_SetFillMode(). 2015-07-20 11:50:18 +02:00
Henri Verbeet f5b4da0ddd d2d1/tests: Don't call compare_surface() inside ok(). 2015-07-20 11:50:15 +02:00
Henri Verbeet a8f45dff60 d2d1: Implement d2d_geometry_sink_AddLines(). 2015-07-14 23:27:22 +09:00
Henri Verbeet b108a2ff78 d2d1: Implement d2d_path_geometry_GetSegmentCount(). 2015-07-10 22:23:02 +09:00
Henri Verbeet dfe1486e4b d2d1: Implement d2d_path_geometry_GetFigureCount(). 2015-07-10 22:23:00 +09:00
Henri Verbeet ddec784aee d2d1: Implement d2d_geometry_sink_BeginFigure() and d2d_geometry_sink_EndFigure(). 2015-07-10 22:22:58 +09:00
Henri Verbeet 2f6f8f1242 d2d1: Only allow path geometries to be opened once. 2015-07-10 22:22:56 +09:00
Henri Verbeet d3cc27f1d8 d2d1/tests: Add some extend mode tests to test_bitmap_brush(). 2015-04-29 12:24:32 +09:00
Henri Verbeet 61a40b0d9c d2d1/tests: Add a test for bitmap brushes. 2015-04-27 18:05:20 +09:00
Henri Verbeet ae7aee3dd6 d2d1/tests: Add a test for color brushes. 2015-03-31 18:49:28 +09:00
Henri Verbeet 7baf2a0f55 d2d1/tests: Add a test for ID2D1DrawingStateBlock. 2015-03-30 19:10:28 +09:00
Henri Verbeet e90b49e2bc d2d1/tests: Add a basic clipping test. 2014-09-08 11:36:20 +02:00