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

Simplify P/Invoke logic in PathGradientBrush.InterpolationColors and SurroundColors - #23957

Merged
mellinoe merged 3 commits into
dotnet:masterfrom
qmfrederik:drawing/pathgradientbrush-pinvoke
Sep 11, 2017
Merged

mellinoe merged 3 commits into
dotnet:masterfrom
qmfrederik:drawing/pathgradientbrush-pinvoke

Conversation

@qmfrederik

@qmfrederik qmfrederik commented Sep 11, 2017 •

Copy link
Copy Markdown

Let the runtime marshal the float[] array instead of processing unmanaged memory ourselves.
Fixes libgdiplus interop issues surfaced by Mono's tests.

Do additional parameter validation in managed code, for libgdiplus compatibility.

…p behavior

Replicate the Desktop behavior in PathGradientBrush.set_InterpolationColors
@qmfrederik qmfrederik changed the title Simplify P/Invoke logic in PathGradientBrush.InterpolationColors Simplify P/Invoke logic in PathGradientBrush.InterpolationColors and SurroundColors Sep 11, 2017
@qmfrederik

Copy link
Copy Markdown
Author

/cc @mellinoe

}
}
finally
if (status != SafeNativeMethods.Gdip.Ok)

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.

nit: Use CheckStatus

@mellinoe

Copy link
Copy Markdown
Contributor

Looks good overall

@qmfrederik

Copy link
Copy Markdown
Author

@mellinoe Thanks, I made the requested change. Let me know if you need anything else.

@mellinoe
mellinoe merged commit 5589201 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
…adientbrush-pinvoke

Simplify P/Invoke logic in PathGradientBrush.InterpolationColors and SurroundColors

Commit migrated from dotnet/corefx@5589201
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