You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The SKRect type does not have a constructor, but rather several overloads of the Make (or Create) methods
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.
Activity
migueldeicaza commentedon Feb 23, 2016
I agree, i was writing this documentation today, and I found this to be confusing.
mattleibow commentedon Feb 23, 2016
@migueldeicaza @joreg That is the
Createmethod. There is a constructor that is LTRB: https://developer.xamarin.com/api/constructor/SkiaSharp.SKRect.SKRect/p/System.Single/System.Single/System.Single/System.Single/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.
mattleibow commentedon Feb 23, 2016
This is the SKRect definition:
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/Definitions.cs#L402-L421
mattleibow commentedon Feb 23, 2016
I had a look some more at the Skia API and see this:
https://github.com/mono/skia/blob/xamarin-mobile-bindings/include/core/SkRect.h
The
SKRecttype does not have a constructor, but rather several overloads of the Make (or Create) methodsI 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.
mattleibow commentedon Feb 23, 2016
So we have several options:
I vote 2.
joreg commentedon Feb 23, 2016
i'd vote for no constructor and all helpers called: From...
tebjan commentedon Feb 23, 2016
I also vote for no constructor to have everything in one place.
The same might be true for other basic shapes as well, for consistency.
migueldeicaza commentedon Feb 23, 2016
I do not see an advantage on making the change, so let us keep the code as is for now.
Merge pull request #17 from unoplatform/dev/jela/misc-fixes