From c4da1b2b5e6f1db6c5704af5f4ab31c8818f64cb Mon Sep 17 00:00:00 2001 From: "229144497@qq.com" Date: Mon, 5 Jul 2021 19:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9B=BF=E6=8D=A2Api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphics/Path.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/graphics/Path.md b/graphics/Path.md index 7b803e7..f16bb2b 100644 --- a/graphics/Path.md +++ b/graphics/Path.md @@ -6,7 +6,6 @@ ```java Path path = new Path(); path.moveTo(100f, 100f); - ``` ### **lineTo** @@ -17,7 +16,6 @@ path.moveTo(100f, 100f); ```java Path path = new Path(); path.lineTo(200f, 200f); - ``` ### **setLastPoint** @@ -30,7 +28,6 @@ Path path = new Path(); path.setLastPoint(100f, 100f); // 或者 path.setLastPoint(new Point(100f, 100f)); - ``` ### **addRect** @@ -41,5 +38,44 @@ path.setLastPoint(new Point(100f, 100f)); ```java Path path = new Path(); path.addRect(new RectFloat(0f, 0f, 100f, 100f), Path.Direction.CLOCK_WISE); +``` +### **addCircle** +>+ openharmony API: ohos.agp.render.Path.addCircle +>+ openharmony SDK版本:2.1.1.21 以上 +>+ IDE版本:2.1.0.501 +>+ 实现方案:替换使用,使用方法如下: +```java +Path path = new Path(); +path.addCircle(x, y, 1f, Path.Direction.CLOCK_WISE); ``` + +### **rLineTo** +>+ openharmony API: ohos.agp.render.Path.rLineTo +>+ openharmony SDK版本:2.1.1.21 以上 +>+ IDE版本:2.1.0.501 +>+ 实现方案:替换使用,使用方法如下: +```java +Path path = new Path(); +path.rLineTo(x, 0); +``` + +### **cubicTo** +>+ openharmony API: ohos.agp.render.Path.cubicTo +>+ openharmony SDK版本:2.1.1.21 以上 +>+ IDE版本:2.1.0.501 +>+ 实现方案:替换使用,使用方法如下: +```java +Path path = new Path(); +path.cubicTo(x1, y1, x2, y2, x, y) +``` + +### **rMoveTo** +>+ openharmony API: ohos.agp.render.Path.rMoveTo +>+ openharmony SDK版本:2.1.1.21 以上 +>+ IDE版本:2.1.0.501 +>+ 实现方案:替换使用,使用方法如下: +```java +Path path = new Path(); +path.rMoveTo(x, y); +``` \ No newline at end of file -- Gitee