SkPath path; path.moveTo(0, 0); path.lineTo(10, 10); path.lineTo(20, 10); int num_points = path.countPoints(); // num_points = 3
SkPath path; path.moveTo(0, 0); path.quadTo(10, 20, 20, 10); int num_points = path.countPoints(); // num_points = 2Here, we create a path consisting of a single quadratic curve. In this case, there are only two points on the curve: the start point and the end point. Therefore, countPoints() returns a value of two. The package library for Skia graphics is usually "skia" or "libskia".