Commit Graph
267 Commits
Author SHA1 Message Date
Frederik Carlier 0c7a00ab2c Try to emulate NetFX exception behavior.
Commit migrated from https://github.com/dotnet/corefx/commit/4649003222ca46b3e16df3524b470f154775325b
2017-09-22 00:02:23 +02:00
Frederik Carlier 53475341bd Workaround libgdiplus glitches
Don't test metafileHeader.Bounds when using libgdiplus.
Don't test metafile.GetBounds on Unix, force MetafileHeader.Bounds to return an empty rectangle when MetafileSize == 0
Don't validate graphicsUnit on Unix.


Commit migrated from https://github.com/dotnet/corefx/commit/825ef7c0d16798739f4cb69d3a4f1e924ef7ff18
2017-09-22 00:02:22 +02:00
Frederik Carlier 7d2ab2341b Don't depend on X11 in the MetafileTests
Commit migrated from https://github.com/dotnet/corefx/commit/6f55b588730ce3d2f341c4ed6af1bc536a570a1d
2017-09-22 00:02:21 +02:00
Eric Mellino a3458ae5be [Drawing] Move remaining "Unix" files into regular directory structure
* As part of this, the "Windows" version of ImageFormat.cs is now being
  used everywhere. This file just contains a bunch of GUID's that are not
  platform-specific in any way.


Commit migrated from https://github.com/dotnet/corefx/commit/74a3d566ecee00e442f05157fd6952f389ff08e2
2017-09-21 12:07:27 -07:00
Hugh Bellamy 447befba58 Fix MultiplyTransform with a disposed brush
Commit migrated from https://github.com/dotnet/corefx/commit/cde07104a9369b2542098e426bc5fa399741272b
2017-09-21 10:00:29 +01:00
Eric Mellino c7a8dd1eb1 Merge pull request dotnet/corefx#24150 from qmfrederik/drawing/graphics-mono-tests
System.Drawing - Add Graphics tests based on Mono's test suite

Commit migrated from https://github.com/dotnet/corefx/commit/de59a4244556433aee39faba347402a30801f03c
2017-09-20 14:56:16 -07:00
Eric Mellino bdc546b52e Merge pull request dotnet/corefx#24166 from hughbe/hatchbrush-fixes
Fix HatchBrush constructor validation, renable more passing tests on Unix

Commit migrated from https://github.com/dotnet/corefx/commit/aa1ff5efc54ee788687c8a912afe2937f4538858
2017-09-20 12:29:24 -07:00
Eric Mellino c6b5d64462 Merge pull request dotnet/corefx#24086 from mellinoe/system.drawing-mono-win32-cleanup
Consolidate more code in the "System.Drawing" namespace.

Commit migrated from https://github.com/dotnet/corefx/commit/dce54eac6369631bf9e0af274cb0abd484edb331
2017-09-20 12:24:42 -07:00
Frederik Carlier 2a18d1b8d2 PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/5d1ee6567cd0cae92b66a49168b5bfdcb91a53f7
2017-09-20 21:21:50 +02:00
Hugh Bellamy 480ef146f9 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/5fbce4b45c94c6f7246d9c58e28c6761dbee7dd9
2017-09-20 19:35:44 +01:00
Hugh Bellamy b226e3eb53 Renable some already passing tests
Commit migrated from https://github.com/dotnet/corefx/commit/fa1422e4b4c608be2b98542736776de1e10c0460
2017-09-20 14:33:57 +01:00
Frederik Carlier a167e80a8e Remove references to historical Mono bug IDs
Commit migrated from https://github.com/dotnet/corefx/commit/822338b447ed336c5e60d23066f1fe347909abe0
2017-09-20 13:10:17 +02:00
Hugh Bellamy d6738fb70d Delete accidentally duplicated HatchBrush tests in LinearGradientBrushTests
Commit migrated from https://github.com/dotnet/corefx/commit/c8767bc47a4a365ad1fc362733b9ba0c36b3707a
2017-09-20 12:06:52 +01:00
Hugh Bellamy e2fe012672 Validate HatchStyle passed to HatchBrush ctor
Commit migrated from https://github.com/dotnet/corefx/commit/6406e382af893765a21eab1d2e11431cb838afde
2017-09-20 12:06:51 +01:00
Frederik Carlier 13dfe8bc6e Cleanup - Add/simplify using statements of disposable resources (Graphics, Bitmap)
Commit migrated from https://github.com/dotnet/corefx/commit/0b5b1e4113ee848041c89256589d6aec5b9672b8
2017-09-20 12:09:34 +02:00
Frederik Carlier b705535783 Bump System.Drawing.Common.TestData to 1.0.6 (dotnet/corefx#24149)
* Bump system.drawing.common.testdata to 1.0.6

* Fix path to test data

* Fix whitespace


Commit migrated from https://github.com/dotnet/corefx/commit/c4e03f00fe667aed5a4a79a4b039a8c842fdfcc4
2017-09-19 14:54:58 -07:00
Eric Mellino a738ddec34 Add an error code fixup to Bitmap.Unix.cs to match Windows.
Commit migrated from https://github.com/dotnet/corefx/commit/a4e548c30693ab6e7922a2d8b1444847265fc1f1
2017-09-19 14:44:46 -07:00
Hugh Bellamy b857b2a16c Fix multiplying TextureBrush with a disposed matrix on Unix (dotnet/corefx#24109)
* Fix multiplying TextureBrush with a disposed matrix on Unix

* Enable another passing test

* Fix accidentally committed file


Commit migrated from https://github.com/dotnet/corefx/commit/15f9a31fd45f9a7d667765ef08ecfd1cefddde3a
2017-09-19 14:28:44 -07:00
Frederik Carlier 8b11690d70 Remove duplicate tests.
Commit migrated from https://github.com/dotnet/corefx/commit/6cdccce2ef06ae448aa99ecface2085157b0c72d
2017-09-19 23:06:10 +02:00
Frederik Carlier 68c6ee08de Add conditionals for recent versions of mono
Commit migrated from https://github.com/dotnet/corefx/commit/a379e9cff54b001eecf37c4653de88b5142c1363
2017-09-19 22:34:28 +02:00
Frederik Carlier 78a70869d4 Tiny bit of code cleanup
Commit migrated from https://github.com/dotnet/corefx/commit/b51ddcb89f66dfde8e33061ac030b01b03628947
2017-09-19 22:34:14 +02:00
Eric Mellino d033bfe602 Consolidate more code in the "System.Drawing" namespace.
* Remove all remaining Win32 codepaths from the mono codebase. All of this
  code now implicitly assumes that it will be run on a Unix platform.
* Consolidate the rest of the gdipFunctions.cs file into Gdip.cs and
  GdipNative.Unix.cs
* Consolidate the GraphicsUnit and ImageType enumerations -- they were
  duplicated.
* Remove the mono Status enum and use the Windows constants instead in all
  Unix code.
* Move all files into the regular directory structure. Suffix them with
  ".Unix" and ".Windows" when there are collisions.


Commit migrated from https://github.com/dotnet/corefx/commit/98a954b18bc3facbfd19ae35481788c738f6ae62
2017-09-19 13:23:59 -07:00
Frederik Carlier f716501dfc Add GraphicsTests based on Mono's test suite.
Commit migrated from https://github.com/dotnet/corefx/commit/a44c20c316e9b847e74252c6644d7ad375df3661
2017-09-19 22:14:50 +02:00
Frederik Carlier be616d3656 Fix whitespace
Commit migrated from https://github.com/dotnet/corefx/commit/4075ec559ca8f4f203b29fd279c1f000eca2b997
2017-09-19 22:03:38 +02:00
Frederik Carlier b65ebf8664 Fix path to test data
Commit migrated from https://github.com/dotnet/corefx/commit/4f06af813b0687dad8566077b13f245eeaa7ea34
2017-09-19 22:02:48 +02:00
Frederik Carlier 6820974e87 Bump system.drawing.common.testdata to 1.0.6
Commit migrated from https://github.com/dotnet/corefx/commit/8020b147e6edddc8e7657fd91db780c4c6b07ab6
2017-09-19 22:00:25 +02:00
Frederik Carlier bc185c528c System.Drawing: Throw ArgumentNullException on Unix as well (dotnet/corefx#24140)
* Throw ArgumentNullException when stream is null

* Throw ArgumentNullException when stream is null


Commit migrated from https://github.com/dotnet/corefx/commit/7099d7e7e2fc0e369f29ddc6e53673f73b619cb6
2017-09-19 08:19:41 -07:00
Eric Mellino 2f7f6965b6 Fix libgdiplus function loading on OSX.
Commit migrated from https://github.com/dotnet/corefx/commit/bc9a9d7ed76053c9b7a5ffad6707002ff7a815db
2017-09-18 14:13:35 -07:00
Eric Mellino 5e193ef586 Remove an assertion from PrintDocumentTests.cs. (dotnet/corefx#24097)
Commit migrated from https://github.com/dotnet/corefx/commit/20bcbcc5392cdadcbf23b1e114ad109ca7fa186e
2017-09-15 21:41:33 -07:00
Eric Mellino 1ef0d9a5bc Merge pull request dotnet/corefx#23991 from mellinoe/system.drawing-misc-cleanup-3
Re-organize and clean up some Unix Drawing code.

Commit migrated from https://github.com/dotnet/corefx/commit/0db86283df5bb08dced21e556a9a475c93e7bd6c
2017-09-13 15:27:23 -07:00
Eric Mellino 28d8deca65 Fix a spurious test failure in System.Drawing.Common.Tests (dotnet/corefx#24009)
* Fix spurious failure in FontTests.cs

* The FontSize in FromLogFont_ValidLogFont seems to be dependent on system
  state, and not a constant value.

* Add better error message to AssertDefaultPageSettings.


Commit migrated from https://github.com/dotnet/corefx/commit/99ac27f1223460424a2ebc0899895884e6c5c191
2017-09-13 13:01:39 -07:00
Eric Mellino 7dcc0bc07c Re-organize and clean up some Unix Drawing code.
Commit migrated from https://github.com/dotnet/corefx/commit/97aec401633ef56a56542597bc0b40460cc24464
2017-09-12 15:57:02 -07:00
Eric Mellino dc5992459f Merge pull request dotnet/corefx#23964 from mellinoe/system.drawing-unify-printing
Fix, clean up and re-organize System.Drawing.Printing code

Commit migrated from https://github.com/dotnet/corefx/commit/b587dc3d0ed68b3c37ea93e5afc472ba2e815dad
2017-09-12 15:23:34 -07:00
Dan Moseley 021b0d7407 Disable Drawing tests on Server Core (dotnet/corefx#23983)
* Add IsWindowsServerCore

* Disable tests for Server Core

* Redundant check

* Mssing ref


Commit migrated from https://github.com/dotnet/corefx/commit/612c36d672297d0308058e1edc803a19dba9811d
2017-09-12 13:55:56 -07:00
Eric Mellino 9252ae21f3 Clean up PrintingServices.Unix.cs more.
Commit migrated from https://github.com/dotnet/corefx/commit/95094889c03a65991270226d986ad4143ae2b3c3
2017-09-12 12:53:10 -07:00
Eric Mellino d3a251a038 Remove a couple of bad assertions in PrinterSettingsTests.cs.
Commit migrated from https://github.com/dotnet/corefx/commit/7204b1dff4e1b92a8796cace7d5905c48ccb2cdf
2017-09-11 16:13:56 -07:00
Eric Mellino 493a112262 Merge pull request dotnet/corefx#23957 from qmfrederik/drawing/pathgradientbrush-pinvoke
Simplify P/Invoke logic in PathGradientBrush.InterpolationColors and SurroundColors

Commit migrated from https://github.com/dotnet/corefx/commit/558920119d099ee3b84bd8dcfec4a13c30e723a8
2017-09-11 16:08:58 -07:00
Eric Mellino 3a2dea2422 Merge pull request dotnet/corefx#23958 from qmfrederik/drawing/pen-pinvoke
System.Drawing - Simplify Pen.get_DashPattern P/Invoke code

Commit migrated from https://github.com/dotnet/corefx/commit/839f044a48f46fef0771e2fd255d061c0a9fcb44
2017-09-11 15:47:48 -07:00
Eric Mellino c28c8a5a58 Move Unix Printing types into regular folder structure.
Commit migrated from https://github.com/dotnet/corefx/commit/04efcad64f3731801eeabe10661c430ae51aa42a
2017-09-11 15:38:05 -07:00
Eric Mellino 13815ba9a5 Allow libcups to be absent.
Commit migrated from https://github.com/dotnet/corefx/commit/359cf6ed31bea58fa5a68841a63f8356b02ce3cc
2017-09-11 14:32:19 -07:00
Eric Mellino 19881df8d9 Use manually-loaded libcups functions.
Commit migrated from https://github.com/dotnet/corefx/commit/ea29f0ad53cd14bd2463db7b1a5d365d31393bb9
2017-09-11 14:29:32 -07:00
Frederik Carlier 7d8858bbdb Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/6351e27655cc8aec281acdf35e4c9c2397580904
2017-09-11 23:29:05 +02:00
Frederik Carlier a7bd1cd0b3 PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/2827f05456d52e4509bb72bf58f20b0c9e5642f2
2017-09-11 23:14:10 +02:00
Eric Mellino 6bdb31de64 Move FunctionWrapper into Common folder.
Commit migrated from https://github.com/dotnet/corefx/commit/50bafd080289e6ef67cdc77bb19020849eb27b7f
2017-09-11 13:49:59 -07:00
Frederik Carlier 3b4344ff14 Save Pen.cs using UTF-8 encoding
Commit migrated from https://github.com/dotnet/corefx/commit/c75e0a7c6fa4f3075a81f3c2056f478c570f7fdf
2017-09-11 22:46:31 +02:00
Frederik Carlier 07bda4250b Pen: Try to replicate exact Desktop System.Drawing behavior, cross-platform.
Commit migrated from https://github.com/dotnet/corefx/commit/5ebd22464238bc1bd84e635e554c317220d0fc03
2017-09-11 22:46:22 +02:00
Frederik Carlier 74d92bea2c Further fine-tine the PenTests
Commit migrated from https://github.com/dotnet/corefx/commit/161d15ecd63d0b67fe66de1af3cb3b37c1af0cad
2017-09-11 22:46:08 +02:00
Frederik Carlier dd8f8e9c29 Simplify Pen.get_DashPattern, improve libgdiplus compatibility.
Commit migrated from https://github.com/dotnet/corefx/commit/22d0801f6bd285c884b4a9649e666b682c88d4e2
2017-09-11 22:41:10 +02:00
Frederik Carlier d8acc5dd6b Simplify PathGradientBrush.set_SurroundColors, to better match Desktop behavior
Replicate the Desktop behavior in PathGradientBrush.set_InterpolationColors


Commit migrated from https://github.com/dotnet/corefx/commit/8690ad7eefdfd54b59b7e4054f902104792e74c3
2017-09-11 22:39:08 +02:00
Frederik Carlier 342038f5f1 Simplify P/Invoke logic in PathGradientBrush.InterpolationColors
Commit migrated from https://github.com/dotnet/corefx/commit/8fa9cac973f7cb7cb0bf5746b753f75f88f2227a
2017-09-11 22:36:48 +02:00