Support Path.addCircle (flutter/engine#4783)

* add Path.addCircle

* docs formatting

* revert path.cc/path.h; remove addCircle and update docs on addOval

* add missing file.
This commit is contained in:
Dan Field
2018-03-29 00:04:47 -04:00
committed by Ian Hickson
parent 0739f028f4
commit 151204edf5
2 changed files with 4 additions and 0 deletions

View File

@@ -7,3 +7,4 @@ Google Inc.
Jim Simon <jim.j.simon@gmail.com>
Ali Bitek <alibitek@protonmail.ch>
Jacob Greenfield <jacob.greenfield.256@gmail.com>
Dan Field <dfield@gmail.com>

View File

@@ -1513,6 +1513,9 @@ class Path extends NativeFieldWrapperClass2 {
/// Adds a new subpath that consists of a curve that forms the
/// ellipse that fills the given rectangle.
///
/// To add a circle, pass an appropriate rectangle as `oval`. [Rect.fromCircle]
/// can be used to easily describe the circle's center [Offset] and radius.
void addOval(Rect oval) {
assert(_rectIsValid(oval));
_addOval(oval.left, oval.top, oval.right, oval.bottom);