-
Notifications
You must be signed in to change notification settings - Fork 522
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
SKRect constructor with width/height broken #17
Comments
I agree, i was writing this documentation today, and I found this to be confusing. |
@migueldeicaza @joreg That is the I can't overload the constructor, but I wanted to do that as a helper method in case you are coming from some other rect object. I didn't want to force the user to calculate the LTRB when he had the XYWH coordinates. |
This is the SKRect definition:
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/Definitions.cs#L402-L421 |
I had a look some more at the Skia API and see this:
The I think we need to decide what we want for the constructor. Or even no constructor. I am in favour of XYWH as the constructor and LTRB as the Create as this is what .NET usually does. |
So we have several options:
I vote 2. |
i'd vote for no constructor and all helpers called: From...
|
I also vote for no constructor to have everything in one place. |
I do not see an advantage on making the change, so let us keep the code as is for now. |
fix: Dangling pointer in SKXamlCanvas after Unload
according to https://developer.xamarin.com/api/member/SkiaSharp.SKRect.Create/p/System.Single/System.Single/System.Single/System.Single/
this constructor should take: x, y, width, height
but apparently it is more like: left, top, right, bottom#
(using libskia_windows.dll x86)
The text was updated successfully, but these errors were encountered: