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
Consider Changing CombineRgn Return Type to Enum #1024
Comments
Your enum looks good. The 3 non-zero values are already defined as constants in the metadata and could be relocated to the enum. The value for |
Windows.Win32.Graphics.Gdi.GDI_REGION_TYPE not found in 1st winmd |
I left ERROR separate for now and added RGN_ERROR to the enum which was an existing alias for ERROR. |
I'm planning to ship a metadata update later this week so if there are other issues affecting WinForms, let me know. |
Is your feature request related to a problem? Please describe.
The current return type of
CombineRgn
is anint
, which affects code readability since getting a 0 as a return may not immediately signify to the reader that there was an error, and no region was created. To work around this, users could create their own enum type, but even then they would still need to cast their enum type everywhere they want to check the return ofCombineRgn
.Describe the solution you'd like
Have
CombineRgn
return an enum type for readability and cleanliness. Perhaps something like:This enum type could also be used for the return type of other methods such as
GetClipBox
,GetRgnBox
,IntersectClipRect
etc.The text was updated successfully, but these errors were encountered: