@shopify/react-native-skia
Version:
High-performance React Native Graphics using Skia
30 lines (26 loc) • 532 B
JavaScript
import { NodeType } from "../../types";
import { JsiDrawingNode } from "../DrawingNode";
export class ParagraphNode extends JsiDrawingNode {
constructor(ctx, props) {
super(ctx, NodeType.Paragraph, props);
}
deriveProps() {
return null;
}
draw(_ref) {
let {
canvas
} = _ref;
const {
paragraph,
x,
y,
width
} = this.props;
if (paragraph) {
paragraph.layout(width);
paragraph.paint(canvas, x, y);
}
}
}
//# sourceMappingURL=ParagraphNode.js.map