UNPKG

@shopify/react-native-skia

Version:

High-performance React Native Graphics using Skia

37 lines (28 loc) 863 B
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { BaseHostObject } from "./Host"; export class JsiSkRect extends BaseHostObject { static fromValue(CanvasKit, rect) { if (rect instanceof JsiSkRect) { return rect.ref; } return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height); } constructor(CanvasKit, ref) { super(CanvasKit, ref, "Rect"); _defineProperty(this, "dispose", () => {// Float32Array }); } get x() { return this.ref[0]; } get y() { return this.ref[1]; } get width() { return this.ref[2] - this.ref[0]; } get height() { return this.ref[3] - this.ref[1]; } } //# sourceMappingURL=JsiSkRect.js.map