diff --git a/packages/skia/cpp/api/JsiSkPath.h b/packages/skia/cpp/api/JsiSkPath.h index c68cfbedc2..5a4bb8fff8 100644 --- a/packages/skia/cpp/api/JsiSkPath.h +++ b/packages/skia/cpp/api/JsiSkPath.h @@ -436,7 +436,11 @@ class JsiSkPath : public JsiSkWrappingSharedPtrHostObject { auto x = arguments[0].asNumber(); auto y = arguments[1].asNumber(); auto r = arguments[2].asNumber(); - getObject()->addCircle(x, y, r); + auto direction = SkPathDirection::kCW; + if (count >= 4 && arguments[3].getBool()) { + direction = SkPathDirection::kCCW; + } + getObject()->addCircle(x, y, r, direction); return thisValue.getObject(runtime); } diff --git a/packages/skia/src/skia/types/Path/Path.ts b/packages/skia/src/skia/types/Path/Path.ts index cc41b71e4b..c8aa1f5aba 100644 --- a/packages/skia/src/skia/types/Path/Path.ts +++ b/packages/skia/src/skia/types/Path/Path.ts @@ -486,7 +486,7 @@ export interface SkPath extends SkJSIInstance<"Path"> { @param radius distance from center to edge @return reference to SkPath */ - addCircle(x: number, y: number, r: number): SkPath; + addCircle(x: number, y: number, r: number, isCCW?: boolean): SkPath; getLastPt(): { x: number; y: number }; diff --git a/packages/skia/src/skia/web/JsiSkPath.ts b/packages/skia/src/skia/web/JsiSkPath.ts index 5fdaf01ecb..40f6d3f8c5 100644 --- a/packages/skia/src/skia/web/JsiSkPath.ts +++ b/packages/skia/src/skia/web/JsiSkPath.ts @@ -303,8 +303,8 @@ export class JsiSkPath extends HostObject implements SkPath { return this.ref.isVolatile(); } - addCircle(x: number, y: number, r: number) { - this.ref.addCircle(x, y, r); + addCircle(x: number, y: number, r: number, isCCW?: boolean) { + this.ref.addCircle(x, y, r, isCCW); return this; }