-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
.NET Core should have a System.Drawing.Primitives Contract with core Types from System.Drawing. #14431
Comments
I don't think KnownColor should be included since it is system dependant and most values have no meaning under console only environments. |
I would also agree that KnownColor, and also all of the static "named" colors on the Color struct should probably be eliminated. We can always have some sort of helper library that has a "Colors" class with a bunch of pre-defined colors in it. |
From our internal discussion:
Api Review to follow shortly internally. |
Not to say I'm against using floats but I'm not quite sure what this has to do SIMD. Is it because a double based Rectangle would require 2 SSE registers instead of one?
Why not create a speclet on GitHub first so the community can provide feedback? |
+1 for a speclet. I have some thoughts about color (RGB, HSV, HSL) and namespace (why System.Numerics and not System.Drawing.Primitives?) |
Same as patricksadowski , Color type under System.Numerics it's a little weird |
By SIMD, the .NET implementation of Vector and other SIMD related types in System.Numerics.Vectors is based on floats, hence using the same primitive type for these types as well. For example a color with rgb can be represented as a Vector3.
A color is RGB, or RGBA which can be represented as Vector3, Vector4. The Color type here will not have any named colors, but vector functions like Lerp, Multiply. It is to be treated as a numeric. |
Closing this issue, and tracking with dotnet/corefx#1563. |
Based on analysis, these types are commonly used even outside Image processing scenarios. We should factor them out to allow for greater code reuse and portability on .NET Core.
• Color
• KnownColor
• Point
• PointF
• Rectangle
• RectangleF
• Size
• SizeF
The text was updated successfully, but these errors were encountered: