should use ImageFormat from @shopify/react-native-skia instead
Opened this issue ยท 0 comments
anhnh27 commented
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch rn-perfect-sketch-canvas@0.3.0
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/rn-perfect-sketch-canvas/src/components/SketchCanvas/SketchCanvas.tsx b/node_modules/rn-perfect-sketch-canvas/src/components/SketchCanvas/SketchCanvas.tsx
index 886bf23..dac0cb5 100644
--- a/node_modules/rn-perfect-sketch-canvas/src/components/SketchCanvas/SketchCanvas.tsx
+++ b/node_modules/rn-perfect-sketch-canvas/src/components/SketchCanvas/SketchCanvas.tsx
@@ -1,9 +1,10 @@
import {
Canvas,
+ ImageFormat,
Path,
TouchInfo,
useCanvasRef,
- useTouchHandler,
+ useTouchHandler
} from '@shopify/react-native-skia';
import React, {
forwardRef,
@@ -11,17 +12,16 @@ import React, {
useImperativeHandle,
useMemo,
} from 'react';
-import { drawingState, derivedPaths } from '../../store';
import { useSnapshot } from 'valtio';
+import { derivedPaths, drawingState } from '../../store';
import { createHistoryStack, createSvgFromPaths } from '../../utils';
+import { STROKE_COLOR, STROKE_STYLE, STROKE_WIDTH } from './constants';
import type {
- SketchCanvasRef,
- SketchCanvasProps,
Point,
+ SketchCanvasProps,
+ SketchCanvasRef,
StyleOptions,
} from './types';
-import { ImageFormat } from './types';
-import { STROKE_COLOR, STROKE_STYLE, STROKE_WIDTH } from './constants';
export const SketchCanvas = forwardRef<SketchCanvasRef, SketchCanvasProps>(
(
This issue body was partially generated by patch-package.