From 3072c5afc51e1c54d684cc3c832a4f70afb1cd5e Mon Sep 17 00:00:00 2001 From: William Hesse Date: Thu, 29 Jul 2021 20:05:55 +0200 Subject: [PATCH] Improve documentation of Path.extendWithPath The documentation used the word "segment" instead of "sub-path". The documentation of Path.addPath described adding a Path as adding a single sub-path. --- lib/ui/painting.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 8023378e717be..086b2df63e5c5 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -2495,8 +2495,7 @@ class Path extends NativeFieldWrapperClass1 { } void _addRRect(Float32List rrect) native 'Path_addRRect'; - /// Adds a new sub-path that consists of the given `path` offset by the given - /// `offset`. + /// Adds the sub-paths of `path`, offset by `offset`, to this path. /// /// If `matrix4` is specified, the path will be transformed by this matrix /// after the matrix is translated by the given offset. The matrix is a 4x4 @@ -2514,8 +2513,9 @@ class Path extends NativeFieldWrapperClass1 { void _addPath(Path path, double dx, double dy) native 'Path_addPath'; void _addPathWithMatrix(Path path, double dx, double dy, Float64List matrix) native 'Path_addPathWithMatrix'; - /// Adds the given path to this path by extending the current segment of this - /// path with the first segment of the given path. + /// Adds the sub-paths of `path`, offset by `offset`, to this path. + /// The current sub-path is extended with the first sub-path + /// of `path`, connecting them with a lineTo if necessary. /// /// If `matrix4` is specified, the path will be transformed by this matrix /// after the matrix is translated by the given `offset`. The matrix is a 4x4