Commit Graph

323 Commits

Author SHA1 Message Date
Vincent Povirk 8f1b722790 gdiplus: Allow more drawing operations to succeed without an HDC.
This should bring things to the mostly-regression-free-but-easier-to-debug
state I was expecting when I removed DIBs from many bitmaps.
2010-11-10 17:18:40 +01:00
Vincent Povirk 3e86d43030 gdiplus: Don't rely on an HDC in GdipMeasureString. 2010-11-01 11:33:51 +01:00
Vincent Povirk 867f3d39e7 gdiplus: Don't rely on an HDC in GdipMeasureCharacterRanges. 2010-11-01 11:33:40 +01:00
Vincent Povirk 9d0cd09597 gdiplus: Add a fallback method for getting HDC's from Graphics objects.
Native does this in more cases (at least for all bitmap graphics
objects), but using gdi32 objects when we can should perform better.
2010-08-18 09:42:58 +02:00
Vincent Povirk 2a345f36e3 gdiplus: Use the software method to draw HBITMAP-less bitmaps. 2010-08-17 11:55:33 +02:00
Vincent Povirk 9a6eabf0b5 gdiplus: Create HBITMAP-less bitmap objects for exotic pixel formats. 2010-08-17 11:55:33 +02:00
Vincent Povirk 963c7090d5 gdiplus: Don't require an HDC to get the resolution of a graphics object. 2010-08-17 11:55:33 +02:00
Vincent Povirk c3ca6be2b9 gdiplus: Give a nice warning when we try to draw to an HDC-less graphics. 2010-08-17 11:55:33 +02:00
Vincent Povirk 5601860b76 gdiplus: Don't require an HDC in get_graphics_bounds. 2010-08-17 11:55:33 +02:00
Vincent Povirk 85a5710688 gdiplus: Don't require an HDC for the convert_unit function. 2010-08-17 11:55:33 +02:00
Wade Gobel cceb3dc77a gdiplus: Implemented GdipFillClosedCurve and GdipFillClosedCurveI. 2010-07-28 14:01:52 +02:00
Wade Gobel f4e2af65c5 gdiplus: Fixed GdipFillClosedCurve2 and GdipFillClosedCurve2I in the cases that count <= 1. 2010-07-28 14:01:52 +02:00
Vincent Povirk 0c8ac02440 gdiplus: Stub GdipRecordMetafileStream. 2010-07-05 11:54:54 +02:00
Vincent Povirk 48ceb3d67f gdiplus: Stub GdipRecordMetafile. 2010-07-05 11:54:52 +02:00
Vincent Povirk 85c0e83dc5 gdiplus: Stub GdipGetRenderingOrigin. 2010-06-25 10:25:45 +02:00
Francois Gouget a56375fcb5 gdiplus: Make measure_ranges_callback() static. 2010-06-24 10:34:44 +02:00
Vincent Povirk 435762024f gdiplus: Always treat out of range string sizes as INT_MAX. 2010-05-10 10:03:00 +02:00
Vincent Povirk 0ae0c0c09e gdiplus: Implement GdipSetImageAttributesWrapMode. 2010-05-10 10:01:48 +02:00
Vincent Povirk 15ebd84daf gdiplus: Implement bitmap color keying. 2010-05-10 10:01:39 +02:00
Vincent Povirk 68ce9e925a gdiplus: Prevent integer overflows when rounding text bounds.
Mono calls GdipMeasureString with a height so large that rounding and
converting it to an integer gives a negative result.
2010-04-19 14:54:11 +02:00
Vincent Povirk ede103c699 gdiplus: Add fixmes for unimplemented imageattributes features. 2010-04-16 12:13:00 +02:00
Vincent Povirk 8b2543b750 gdiplus: Always use software to draw bitmaps to bitmaps. 2010-04-16 12:12:54 +02:00
Vincent Povirk 4247247787 gdiplus: Implement color remapping. 2010-04-16 12:12:48 +02:00
Vincent Povirk bb9c1878c3 gdiplus: Correct the coordinate transform for non-rectangular parallelograms.
Apparently matrices in gdiplus don't work the way I think they do.
2010-04-16 12:12:37 +02:00
Vincent Povirk 7791f02fd9 gdiplus: Transform bitmaps to non-rectangular parallelograms in software. 2010-04-16 12:12:30 +02:00
Vincent Povirk 9c380b1e8e gdiplus: Use a helper function to draw image data from bitmaps in software.
This will make it possible to use the same codepath for non-bitmap graphics
objects and to create a software implementation for other drawing operations.
2010-04-16 12:12:24 +02:00
Vincent Povirk 2f9c6091fc gdiplus: Use UnitPixel for metafile bounds when creating from HMETAFILE. 2010-04-16 12:10:13 +02:00
Vincent Povirk 9a4618a4ba gdiplus: Print the GdipCreateHalftonePalette FIXME only once. 2010-04-09 18:34:57 +02:00
Vincent Povirk ade2506029 gdiplus: Implement GdipFlush. 2010-04-02 16:53:07 +02:00
Vincent Povirk deb6466f3f gdiplus: Implement GdipMeasureCharacterRanges. 2010-03-31 11:40:20 +02:00
Vincent Povirk 21109a40fb gdiplus: Fix the linesfilled calculation in GdipMeasureString. 2010-03-31 11:40:08 +02:00
Vincent Povirk 2cde94a89e gdiplus: Rewrite GdipDrawString to share code with GdipMeasureString. 2010-03-31 11:39:58 +02:00
Vincent Povirk 3cee74c61d gdiplus: Rewrite GdipMeasureString using a helper function. 2010-03-31 11:39:51 +02:00
Vincent Povirk 32d03da998 gdiplus: Add a missing NULL check to GdipMeasureString. 2010-03-31 11:37:51 +02:00
Vincent Povirk 5433969ec8 gdiplus: Don't use gdi32 to draw to bitmaps with formats it can't handle. 2010-03-29 12:19:48 +02:00
Justin Chevrier b4bfa6e1c1 gdiplus: Basic implementation of GdipGetNearestColor with changes to test to reflect fixes. 2010-02-26 14:18:59 +01:00
Vincent Povirk 00dec58bb2 gdiplus: Convert formats that can't be drawn by gdi32 when drawing bitmaps. 2010-02-15 12:20:00 +01:00
Alistair Leslie-Hughes 03e31f9b86 gdiplus: Implement GdipIsVisibleClipEmpty. 2010-01-05 12:29:43 +01:00
Vincent Povirk 2005fe9881 gdiplus: Add traces to unimplemented functions in graphics.c. 2010-01-04 11:44:52 +01:00
Vincent Povirk 01b32951a5 gdiplus: Fix a memory leak in GdipCreateMetafileFromWmf. 2010-01-04 11:41:27 +01:00
Vincent Povirk 1aea88cac1 gdiplus: Implement GdipGetImage*Resolution. 2009-12-28 12:57:37 +01:00
Vincent Povirk c38d334266 gdiplus: Fix typo in GdipCreateMetafileFromWmf. 2009-12-28 12:57:23 +01:00
Vincent Povirk 7ded3d83c6 gdiplus: Add some traces for the values of point arguments. 2009-12-28 11:54:27 +01:00
Vincent Povirk f8ca372459 gdiplus: Add trace for values of new graphics and image objects. 2009-12-21 15:01:23 +01:00
Huw Davies 68bacfb8d5 gdiplus: Fix a memory leak.
Found by Valgrind.
2009-12-14 12:04:04 +01:00
Vincent Povirk 39dc81cc80 gdiplus: Implement GdipSetImagePalette. 2009-12-14 12:04:03 +01:00
Vincent Povirk d2e999d2e8 gdiplus: Use the preset blend when drawing linear gradients. 2009-09-15 17:34:56 -05:00
Vincent Povirk 0595fc5e03 gdiplus: Implement GdipGetImageRawFormat. 2009-09-15 17:34:12 -05:00
Vincent Povirk 99012b9a4e gdiplus: Don't use the supplied rect to calculate font scaling factors. 2009-09-08 13:44:25 +02:00
Vincent Povirk 94ab23377d gdiplus: Implement GdipDrawImagePointRect. 2009-09-08 13:44:01 +02:00
Vincent Povirk aef202507b gdiplus: Remove unused bitmap flipping code. 2009-09-08 12:13:07 +02:00
Vincent Povirk 895c6d8e1e gdiplus: Use AlphaBlend for 32-bit images with alpha channels. 2009-08-29 16:48:56 +02:00
Vincent Povirk 436b3be651 gdiplus: Create DIBs instead of IPictures in CreateBitmapFromScan0. 2009-08-29 16:48:55 +02:00
Andrew Eikum f5896a2be0 gdiplus: Implement GdipIsVisibleRect. 2009-08-27 11:51:24 +02:00
Andrew Eikum d06dd2d7cb gdiplus: Implement GdipIsVisiblePoint. 2009-08-27 11:51:08 +02:00
Andrew Eikum 39f6f491a6 gdiplus: Add utility function get_visible_clip_region. 2009-08-27 11:50:23 +02:00
Andrew Eikum 32996e0a11 gdiplus: Implement GdipIsVisibleRegionPoint. 2009-08-26 14:57:18 +02:00
Vincent Povirk e72defc8f7 gdiplus: Do not call IPicture_Render directly from GdipDrawImageI. 2009-08-21 11:28:29 +02:00
Andrew Eikum ef0ee6e556 gdiplus: Implement GdipGetVisibleClipBounds. 2009-08-13 16:44:09 +02:00
Andrew Eikum fdf48f1d4d gdiplus: Create utility function get_graphics_bounds. 2009-08-13 16:43:41 +02:00
Ken Sharp e072d36a87 gdiplus: Add GdipIsVisibleRectI stub. 2009-08-06 12:25:53 +02:00
Alistair Leslie-Hughes 7b2292fac1 gdiplus: Add GdipRecordMetafileI stub. 2009-08-04 15:21:00 +02:00
Vincent Povirk e0d9d17536 gdiplus: Do not draw line-breaking spaces. 2009-08-03 14:55:29 +02:00
Vincent Povirk b330ebfe8e gdiplus: Don't use -escapement angle in GdipDrawString. 2009-08-03 14:55:15 +02:00
Vincent Povirk 849af30eb8 gdiplus: Use brush_fill_path in GdipFillRectangleI. 2009-07-13 10:25:30 +02:00
Vincent Povirk 6a8a770c76 gdiplus: Use brush_fill_path in GdipFillRegion. 2009-07-13 10:25:26 +02:00
Vincent Povirk 38fc894c96 gdiplus: Use brush_fill_path in GdipFillPolygonI. 2009-07-13 10:25:19 +02:00
Vincent Povirk 15fef07887 gdiplus: Use brush_fill_path in GdipFillPolygon. 2009-07-13 10:25:10 +02:00
Vincent Povirk bedbd40f5e gdiplus: Use brush_fill_path in GdipFillPie. 2009-07-13 10:25:06 +02:00
Vincent Povirk e306316c7d gdiplus: Use brush_fill_path in GdipFillEllipse. 2009-07-13 10:25:02 +02:00
Andrew Eikum 1ef13941f6 gdiplus: Implement GdipSaveGraphics and GdipRestoreGraphics. 2009-07-08 20:35:20 +02:00
Andrew Eikum a06c2570e5 gdiplus: Don't modify container list if container restoration fails. 2009-07-08 20:35:09 +02:00
Andrew Eikum 632aef3d8b gdiplus: Implement GdipBeginContainer2 and GdipEndContainer. 2009-07-07 12:33:10 +02:00
Vincent Povirk 9fceef33b7 gdiplus: Don't crash when a NULL format is passed to GdipDrawString. 2009-07-01 11:38:11 +02:00
Andrew Eikum 4c0edba681 gdiplus: Implement GdipDrawCurve3 and GdipDrawCurve3I. 2009-06-30 12:58:31 +02:00
Vincent Povirk aa9602db10 gdiplus: Implement horizontal alignment in GdipDrawString. 2009-06-30 12:31:37 +02:00
Andrew Eikum c2aa66d506 gdiplus/tests: Add tests for GdipDrawCurve2I. 2009-06-29 12:29:35 +02:00
Andrew Eikum fe55f0df2a gdiplus/tests: Add tests for GdipDrawCurveI. 2009-06-29 12:29:32 +02:00
Ken Sharp e096b59ceb gdiplus: Add GdipIsVisibleRegionPointI stub. 2009-06-23 15:53:00 +02:00
Francois Gouget 489bd52aff gdiplus: Remove spaces before '\n's. 2009-06-15 13:42:29 +02:00
Ken Sharp e3f4859961 gdiplus: Add stubs for GdipGetVisibleClipBoundsI, GdipDrawDriverString & GdipMeasureDriverString. 2009-06-10 12:19:45 +02:00
Andrew Eikum 119e9af74a gdiplus: Test cases and parameter checks for GdipDrawCurve. 2009-06-08 12:41:58 +02:00
Stephan Rose eb3904d02b gdiplus: Add support for vertical string alignment to GdipDrawString. 2009-06-05 15:19:56 +02:00
Andrew Eikum 156eeb08be gdiplus: Stubs for GdipDrawImagePoints and GdipDrawImagePointsI. 2009-06-04 12:38:37 +02:00
Andrew Eikum eec8d511cc gdiplus: Stubs for GdipDrawImagePointRect and GdipDrawImagePointRectI. 2009-06-03 11:53:25 +02:00
Andrew Eikum c02e75cf78 gdiplus: Stubs for GdipCreateMetafileFromFile, GdipCreateMetafileFromStream. 2009-06-02 12:08:44 +02:00
Andrew Eikum b850008bec gdiplus: Stub for GdipComment. 2009-06-02 11:57:22 +02:00
Andrew Eikum 3091506609 gdiplus: Stubs for GdipBeginContainer and GdipBeginContainerI. 2009-06-01 16:16:06 +02:00
Vincent Povirk 60167dfb74 gdiplus: Implement partially transparent solid fill brushes. 2009-05-21 16:17:52 +02:00
Vincent Povirk c486e8147d gdiplus: Implement GdipTransformPointsI. 2009-05-20 10:51:42 +02:00
Vincent Povirk 2af29ed916 gdiplus: Implement GdipTransformPoints. 2009-05-20 10:51:33 +02:00
Vincent Povirk 0f80aa8816 gdiplus: Add a trace to GdipMeasureString. 2009-05-14 11:13:35 +02:00
Vincent Povirk 3dd5ce7874 gdiplus: Add a trace to GdipDrawString. 2009-05-14 11:13:29 +02:00
Vincent Povirk 323e7e68eb gdiplus: Use brush_fill_path in GdipFillRectangle. 2009-05-07 14:44:22 +02:00
Vincent Povirk 27b47ead7e gdiplus: Stub GdipSetRenderingOrigin. 2009-05-07 14:44:22 +02:00
Vincent Povirk cb478a3258 gdiplus: Don't draw outside of gradient lines.
Currently, gradients are drawn by filling a series of quadrilaterals,
with one side equal to a gradient line and the other side equal to the
edge of the bounding rectangle of the area being filled. A single
pixel can be filled many times, and that causes flicker.
2009-05-04 12:50:42 +02:00
Vincent Povirk 966fd5ec09 gdiplus: Properly draw points outside of line gradients.
Theoretically, a line gradient covers the area enclosed by the
starting and ending gradient lines, which intersect the start and end
points respectively and are perpendicular to a line joining the start
and end points.
2009-05-04 12:50:33 +02:00
Vincent Povirk a6161307cf gdiplus: Account for blend factors and positions in line gradients. 2009-05-04 12:50:18 +02:00
Vincent Povirk c3d2395669 gdiplus: Don't leak a device context when GdipCreateFromHWND fails. 2009-04-27 13:23:05 +02:00
Vincent Povirk 8a3d9ff773 gdiplus: Only release device contexts created internally. 2009-04-27 13:23:00 +02:00