*/
SK_C_API bool sk_path_get_bounds(const sk_path_t*, sk_rect_t*);
+SK_C_API void sk_path_compute_tight_bounds(const sk_path_t*, sk_rect_t*);
+
/** Set the beginning of the next contour relative to the last point on the
previous contour. If there is no previous contour, this is treated the
same as sk_path_move_to.
return true;
}
+void sk_path_compute_tight_bounds(const sk_path_t* cpath, sk_rect_t* crect) {
+ if (crect) {
+ const SkPath& path = AsPath(*cpath);
+ *crect = ToRect(path.computeTightBounds());
+ }
+}
+
int sk_path_count_points(const sk_path_t* cpath) {
const SkPath& path = AsPath(*cpath);
return path.countPoints();