Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

System.Drawing - Fix and simplify PathGradientBrush.Blend and GdipSaveImageToFile_delegate PInvoke code - #23956

Merged
mellinoe merged 1 commit into
dotnet:masterfrom
qmfrederik:drawing/pinvoke
Sep 11, 2017
Merged

mellinoe merged 1 commit into
dotnet:masterfrom
qmfrederik:drawing/pinvoke

Conversation

@qmfrederik

Copy link
Copy Markdown

Fixes/cleans up some of the P/Invoke code in System.Drawing, as a result of bugs that surfaced when porting Mono's test to netfx.

  • PathGradientBrush: Let the runtime marshal the float arrays instead of manually reading unmanaged memory
  • GdipSaveImageToFile_delegate: Marshal filename as LPWStr

@qmfrederik

Copy link
Copy Markdown
Author

/cc @mellinoe

@qmfrederik qmfrederik changed the title System.Drawing - Fix and simplify PInvoke code System.Drawing - Fix and simplify PathGradientBrush.Blend and GdipSaveImageToFile_delegate PInvoke code Sep 11, 2017

@mellinoe mellinoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. The string marshalling attributes in particular are kind of a pit of failure, I have noticed.

@mellinoe

Copy link
Copy Markdown
Contributor

@mellinoe
mellinoe merged commit 3a09bd3 into dotnet:master Sep 11, 2017
@karelz karelz added this to the 2.1.0 milestone Oct 11, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
System.Drawing - Fix and simplify PathGradientBrush.Blend and GdipSaveImageToFile_delegate PInvoke code

Commit migrated from dotnet/corefx@3a09bd3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants