Skip to content

Commit 540047e

Browse files
authored
Merge pull request #2061 from Shopify/drawing
Remove drawing node
2 parents 3154f31 + 4a3d01d commit 540047e

File tree

14 files changed

+0
-277
lines changed

14 files changed

+0
-277
lines changed

docs/docs/shapes/custom-drawing.md

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

docs/sidebars.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const sidebars = {
5454
"shapes/vertices",
5555
"shapes/patch",
5656
"shapes/pictures",
57-
"shapes/custom-drawing",
5857
],
5958
},
6059
{

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",

0 commit comments

Comments
 (0)