UNPKG

react-native-image-filter-kit

Version:
28 lines 1.77 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; return t; }; export const shapeTransforms = { ColorGenerator: (_a) => { var { color } = _a, config = __rest(_a, ["color"]); return (Object.assign({}, config, { name: 'CIConstantColorGenerator', inputColor: color })); }, LinearGradientGenerator: (_a) => { var { colors = ['red', 'blue'], stops = [0, 1], start = { x: 0, y: '0h' }, end = { x: '100w', y: '0h' } } = _a, config = __rest(_a, ["colors", "stops", "start", "end"]); return (Object.assign({}, config, { name: 'IFKLinearGradient', inputColors: colors, inputStops: stops, inputStart: start, inputEnd: end })); }, RadialGradientGenerator: (_a) => { var { colors = ['red', 'blue'], stops = [0, 1], center = { x: '50w', y: '50h' }, radius = '50min' } = _a, config = __rest(_a, ["colors", "stops", "center", "radius"]); return (Object.assign({}, config, { name: 'IFKRadialGradient', inputColors: colors, inputStops: stops, inputCenter: center, inputRadius: radius })); }, SweepGradientGenerator: (_a) => { var { colors = ['red', 'blue'], stops = [0, 1], center = { x: '50w', y: '50h' } } = _a, config = __rest(_a, ["colors", "stops", "center"]); return (Object.assign({}, config, { name: 'IFKSweepGradient', inputColors: colors, inputStops: stops, inputCenter: center })); } }; //# sourceMappingURL=shape-transforms.ios.js.map