Skip to content

Conversation

@elachlan
Copy link
Contributor

@elachlan elachlan commented Jul 28, 2022

Fixes #626
Related: dotnet/winforms#7468

@elachlan
Copy link
Contributor Author

CC: @lonitra

Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Looks like you added the functionality all right where it fits the design. Thank you. Just a couple of changes, please.

@elachlan elachlan requested a review from AArnott July 29, 2022 00:29
@elachlan elachlan requested a review from AArnott August 2, 2022 03:25
AArnott added 2 commits August 3, 2022 07:42
The `SIZE` and and `RECT` structs have no BCL equivalents, at least not with the fields in the right order.
Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

It turns out that SIZE cannot be replaced with the BCL Size struct because the fields are in a different order. I moved POINT and POINTF to another dictionary in the generator so that they are never generated, even when not marshaling, since the BCL struct types should be adequate and this gives an even better interop experience. I deleted the point templates since we never generate those types any more.
Thank you for starting on this, for the tests and the rect and size templates. This is definitely an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding cast operators to System.Drawing types

2 participants