Skip to content

Commit 1b52680

Browse files
committed
Implement review comment
1 parent 5f35e8e commit 1b52680

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

package/src/skia/web/api/JsiSkPaint.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { HostObject, toNullableValue, ckEnum } from "./Host";
1818

1919
export class JsiSkPaint extends HostObject<Paint, "Paint"> implements SkPaint {
2020
constructor(CanvasKit: CanvasKit, ref: Paint) {
21+
ref.setAntiAlias(true);
2122
super(CanvasKit, ref, "Paint");
2223
}
2324

package/src/skia/web/api/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ export const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({
5858
CanvasKit,
5959
new CanvasKit.ContourMeasureIter(toValue(path), forceClosed, resScale)
6060
),
61-
Paint: () => {
62-
const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());
63-
paint.setAntiAlias(true);
64-
return paint;
65-
},
61+
Paint: () => new JsiSkPaint(CanvasKit, new CanvasKit.Paint()),
6662
PictureRecorder: () =>
6763
new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),
6864
Picture: new JsiSkPictureFactory(CanvasKit),

0 commit comments

Comments
 (0)