diff --git a/graphics/Path.md b/graphics/Path.md index 7b803e7cb1e9454047bec82aa88648f912b89c03..f16bb2b62f59208b98fd6cc4d38a33d3240c7d93 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