From d20c23b15f208aa0e384c8b9335e5fa24f8a6588 Mon Sep 17 00:00:00 2001 From: Joshua Baxter Date: Wed, 6 Nov 2019 00:46:42 +0000 Subject: docs: Fix docs for Canvas#drawTextOnPath add parameter descriptions for index and count in drawTextOnPath fix a couple of typos test: make ds-docs Bug: 36969777 Change-Id: I7c451fac4468fb2066b9b29a321fad57785a8a36 --- graphics/java/android/graphics/Canvas.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java index 5648b854db40..a815f20293c5 100644 --- a/graphics/java/android/graphics/Canvas.java +++ b/graphics/java/android/graphics/Canvas.java @@ -2095,9 +2095,11 @@ public class Canvas extends BaseCanvas { /** * Draw the text, with origin at (x,y), using the specified paint, along the specified path. The - * paint's Align setting determins where along the path to start the text. + * paint's Align setting determines where along the path to start the text. * * @param text The text to be drawn + * @param index The starting index within the text to be drawn + * @param count Starting from index, the number of characters to draw * @param path The path the text should follow for its baseline * @param hOffset The distance along the path to add to the text's starting position * @param vOffset The distance above(-) or below(+) the path to position the text @@ -2110,7 +2112,7 @@ public class Canvas extends BaseCanvas { /** * Draw the text, with origin at (x,y), using the specified paint, along the specified path. The - * paint's Align setting determins where along the path to start the text. + * paint's Align setting determines where along the path to start the text. * * @param text The text to be drawn * @param path The path the text should follow for its baseline -- cgit v1.2.3-59-g8ed1b From 811e7aa55708ef02323077e19d1904467261df93 Mon Sep 17 00:00:00 2001 From: Joshua Baxter Date: Tue, 5 Nov 2019 23:12:40 +0000 Subject: docs: fix typos Change-Id: Ica9765713212955caf3c7fb246ef4ad8ca0e1c35 test: make ds-docs bug: 113636515 --- graphics/java/android/graphics/Paint.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index b7316ab03618..109d8631284d 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -1114,7 +1114,7 @@ public class Paint { * Return the width for stroking. *

* A value of 0 strokes in hairline mode. - * Hairlines always draws a single pixel independent of the canva's matrix. + * Hairlines always draws a single pixel independent of the canvas's matrix. * * @return the paint's stroke width, used whenever the paint's style is * Stroke or StrokeAndFill. @@ -1126,7 +1126,7 @@ public class Paint { /** * Set the width for stroking. * Pass 0 to stroke in hairline mode. - * Hairlines always draws a single pixel independent of the canva's matrix. + * Hairlines always draws a single pixel independent of the canvas's matrix. * * @param width set the paint's stroke width, used whenever the paint's * style is Stroke or StrokeAndFill. @@ -1958,8 +1958,8 @@ public class Paint { * * Paint paint = new Paint(); * paint.setStartHyphenEdit(Paint.START_HYPHEN_EDIT_INSERT_HYPHEN); - * paint.measureText("abc", 0, 3); // Returns the width of "‐abc" - * Canvas.drawText("abc", 0, 3, 0f, 0f, paint); // Draws "‐abc" + * paint.measureText("abc", 0, 3); // Returns the width of "-abc" + * Canvas.drawText("abc", 0, 3, 0f, 0f, paint); // Draws "-abc" * * * @@ -1985,8 +1985,8 @@ public class Paint { * * Paint paint = new Paint(); * paint.setEndHyphenEdit(Paint.END_HYPHEN_EDIT_INSERT_HYPHEN); - * paint.measureText("abc", 0, 3); // Returns the width of "abc‐" - * Canvas.drawText("abc", 0, 3, 0f, 0f, paint); // Draws "abc‐" + * paint.measureText("abc", 0, 3); // Returns the width of "abc-" + * Canvas.drawText("abc", 0, 3, 0f, 0f, paint); // Draws "abc-" * * * -- cgit v1.2.3-59-g8ed1b