Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use system.numerics instead of customized struct D2DPoint and D2DMatrix3x2 #97

Merged
merged 5 commits into from
Nov 6, 2022

Conversation

jingwood
Copy link
Owner

@jingwood jingwood commented Nov 5, 2022

Changes

  • Use System.Numerics.Vector2 instead of D2DPoint
  • Use System.Numerics.Matrix3x2 instead of D2DMatrix3x2
  • Make implicit conversion between D2DSize and Vector2

@jingwood jingwood changed the title Use system.numeric instead of customized struct like D2DPoint and D2DMatrix3x2 Use system.numeric instead of customized struct D2DPoint and D2DMatrix3x2 Nov 5, 2022
@jingwood jingwood changed the title Use system.numeric instead of customized struct D2DPoint and D2DMatrix3x2 Use system.numerics instead of customized struct D2DPoint and D2DMatrix3x2 Nov 5, 2022
Copy link
Collaborator

@drewnoakes drewnoakes left a comment

Choose a reason for hiding this comment

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

Looks good!

@nikeee
Copy link
Contributor

nikeee commented Nov 6, 2022

+1

@jingwood jingwood merged commit 1e3f692 into master Nov 6, 2022
@jingwood jingwood deleted the use-System.Numeric branch November 6, 2022 22:09
@drewnoakes
Copy link
Collaborator

Given this is a fairly decent API break, are there other API changes we could includes in the next release?

@jingwood
Copy link
Owner Author

jingwood commented Nov 8, 2022

I am thinking make the Direct 1.1 support available in the next release, if possible...
https://github.com/jingwood/d2dlib/milestone/1

What do you think?

@drewnoakes
Copy link
Collaborator

I've commented on #60.

@nikeee
Copy link
Contributor

nikeee commented Nov 17, 2022

In the nud2dlib fork, I've done some work to better support C#'s non-nullable-reference-types:
nikeee/nud2dlib@83843e8

I also fiddled around with SuppressGCTransition in this commit:
nikeee/nud2dlib@79361de
I'm not sure if adding the attribute was/is valid in this case (it's a long time ago). But it was ment to improve the performance of pinvoke calls to the native DLL (see linked article).

There were also some unused resources: nikeee/nud2dlib@8ea17c3

Maybe these kinds of simplifications would be something worth to backport:
nikeee/nud2dlib@e5ebacb
nikeee/nud2dlib@5e4030f

If you're in on some of these, I'd be happy to file some PRs.

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.

3 participants