Conversation
9b0efaf to
cf29ec3
Compare
There was a problem hiding this comment.
In theory, you can have a separate radius for top and bottom as well. That's pretty rare though (and we haven't supported it up to this point).
There was a problem hiding this comment.
We could in theory have separate x and y radii for each individual corner. Right now we only support kEmpty_Type, kRect_Type, kOval_Type, and kSimple_Type skia RRect types. Skia supports kNinePatch_Type and kComplex_Type but those aren't exposed here at all.
|
LGTM |
|
I mean, the hard-coded numbers are fine too. Maybe it's better with the numeral since we address into the array with numerals in lots of places in this file already. |
|
How about a constant, that way if you copy-pasta the code out, you at least see that there's something to change. |
Other changes: - Remove the default constructor for RRect and Rect. - Add trailing periods to Offset comments. - Add Offset.distanceSquared for people who want to compare x^2+y^2 to r^2 without paying the cost of the sqrt. (Corresponding fix to OvalRect coming in a separate flutter patch.) - Fix a bug in Rect.lerp(). - Fix various Rect comments. - Remove a "var" in Rect. Fixes flutter#769.
Other changes:
to r^2 without paying the cost of the sqrt. (Corresponding fix to
OvalRect coming in a separate flutter patch.)
Fixes flutter/flutter#769.