Skip to content

Commit b39de91

Browse files
committed
Remove drawing node
1 parent 3154f31 commit b39de91

File tree

12 files changed

+0
-231
lines changed

12 files changed

+0
-231
lines changed

package/cpp/rnskia/dom/JsiDomApi.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
#include "nodes/JsiBoxNode.h"
4141
#include "nodes/JsiBoxShadowNode.h"
4242

43-
#include "nodes/JsiCustomDrawingNode.h"
44-
4543
#include "nodes/JsiGlyphsNode.h"
4644
#include "nodes/JsiTextBlobNode.h"
4745
#include "nodes/JsiTextNode.h"
@@ -154,9 +152,6 @@ class JsiDomApi : public JsiHostObject {
154152
installFunction("BoxNode", JsiBoxNode::createCtor(context));
155153
installFunction("BoxShadowNode", JsiBoxShadowNode::createCtor(context));
156154

157-
installFunction("CustomDrawingNode",
158-
JsiCustomDrawingNode::createCtor(context));
159-
160155
installFunction("GlyphsNode", JsiGlyphsNode::createCtor(context));
161156
installFunction("TextNode", JsiTextNode::createCtor(context));
162157
installFunction("TextPathNode", JsiTextPathNode::createCtor(context));

package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h

Lines changed: 0 additions & 127 deletions
This file was deleted.

package/cpp/rnskia/dom/props/DrawingProp.h

Lines changed: 0 additions & 35 deletions
This file was deleted.

package/src/dom/nodes/JsiSkDOM.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import type {
1111
PaintProps,
1212
ShaderProps,
1313
ImageShaderProps,
14-
CustomDrawingNodeProps,
1514
LineProps,
1615
OvalProps,
1716
PatchProps,
@@ -72,7 +71,6 @@ import {
7271
VerticesNode,
7372
TextNode,
7473
OvalNode,
75-
CustomDrawingNode,
7674
TextPathNode,
7775
TextBlobNode,
7876
GlyphsNode,
@@ -172,16 +170,6 @@ export class JsiSkDOM implements SkDOM {
172170
: new PathNode(this.ctx, props);
173171
}
174172

175-
CustomDrawing(props: CustomDrawingNodeProps) {
176-
console.warn(
177-
// eslint-disable-next-line max-len
178-
"The <Drawing /> component is deprecated and will be removed in the next release. For custom drawings, please sure the <Picture /> component: https://shopify.github.io/react-native-skia/docs/shapes/pictures/"
179-
);
180-
return NATIVE_DOM
181-
? global.SkiaDomApi.CustomDrawingNode(props ?? {})
182-
: new CustomDrawingNode(this.ctx, props);
183-
}
184-
185173
Line(props: LineProps) {
186174
return NATIVE_DOM
187175
? global.SkiaDomApi.LineNode(props ?? {})

package/src/dom/nodes/drawings/CustomDrawingNode.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

package/src/dom/nodes/drawings/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export * from "./OvalNode";
99
export * from "./LineNode";
1010
export * from "./PatchNode";
1111
export * from "./VerticesNode";
12-
export * from "./CustomDrawingNode";
1312
export * from "./Text";
1413
export * from "./PictureNode";
1514
export * from "./DiffRectNode";

package/src/dom/types/Drawings.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import type {
2626
RRectDef,
2727
SkEnum,
2828
} from "./Common";
29-
import type { DrawingContext } from "./DrawingContext";
3029

3130
export interface DrawingNodeProps extends GroupProps {
3231
paint?: SkPaint;
@@ -48,10 +47,6 @@ export interface PathProps extends DrawingNodeProps {
4847
fillType?: SkEnum<typeof FillType>;
4948
}
5049

51-
export interface CustomDrawingNodeProps extends DrawingNodeProps {
52-
drawing: (ctx: DrawingContext) => void;
53-
}
54-
5550
export interface LineProps extends DrawingNodeProps {
5651
p1: Vector;
5752
p2: Vector;

package/src/dom/types/NodeType.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export const enum NodeType {
4848

4949
// Drawings
5050
Group = "skGroup",
51-
Drawing = "skDrawing",
5251
Paint = "skPaint",
5352
Circle = "skCircle",
5453
Fill = "skFill",

package/src/dom/types/SkDOM.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type {
1919
ImageProps,
2020
CircleProps,
2121
PathProps,
22-
CustomDrawingNodeProps,
2322
LineProps,
2423
OvalProps,
2524
PatchProps,
@@ -77,9 +76,6 @@ export interface SkDOM {
7776
Image(props: ImageProps): DrawingNode<ImageProps>;
7877
Circle(props: CircleProps): DrawingNode<CircleProps>;
7978
Path(props: PathProps): DrawingNode<PathProps>;
80-
CustomDrawing(
81-
props: CustomDrawingNodeProps
82-
): DrawingNode<CustomDrawingNodeProps>;
8379
Line(props: LineProps): DrawingNode<LineProps>;
8480
Oval(props: OvalProps): DrawingNode<OvalProps>;
8581
Patch(props: PatchProps): DrawingNode<PatchProps>;

package/src/renderer/HostComponents.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {
88
ImageProps,
99
PaintProps,
1010
PathProps,
11-
CustomDrawingNodeProps,
1211
LineProps,
1312
OvalProps,
1413
DiffRectProps,
@@ -86,9 +85,6 @@ declare global {
8685
FillNode: (props: PaintProps) => RenderNode<PaintProps>;
8786
CircleNode: (props: CircleProps) => RenderNode<CircleProps>;
8887
PathNode: (props: PathProps) => RenderNode<PathProps>;
89-
CustomDrawingNode: (
90-
props: CustomDrawingNodeProps
91-
) => RenderNode<CustomDrawingNodeProps>;
9288
LineNode: (props: LineProps) => RenderNode<LineProps>;
9389
ImageNode: (props: ImageProps) => RenderNode<ImageProps>;
9490
OvalNode: (props: OvalProps) => RenderNode<OvalProps>;
@@ -211,7 +207,6 @@ declare global {
211207
skImage: SkiaProps<ImageProps>;
212208
skCircle: SkiaProps<CircleProps>;
213209
skPath: SkiaProps<PathProps>;
214-
skDrawing: SkiaProps<CustomDrawingNodeProps>;
215210
skLine: SkiaProps<LineProps>;
216211
skOval: SkiaProps<OvalProps>;
217212
skPatch: SkiaProps<PatchProps>;
@@ -302,8 +297,6 @@ export const createNode = (
302297
return Sk.Circle(props);
303298
case NodeType.Path:
304299
return Sk.Path(props);
305-
case NodeType.Drawing:
306-
return Sk.CustomDrawing(props);
307300
case NodeType.Line:
308301
return Sk.Line(props);
309302
case NodeType.Oval:

0 commit comments

Comments
 (0)