How to use the react-native-svg/lib/extract/extractBrush function in react-native-svg

To help you get started, we’ve selected a few react-native-svg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prameetchakraborty / AnimatedRoundSlider / src / AnimatedSlider.js View on Github external
this.state.fillValue.addListener(() => {
            const { fill, angleLength, startAngle } = this.props;
            const { fillValue } = this.state;
            const fillColor = startAngle + 1;
            const fillPartition = fillColor/7;
            const color = fillValue.interpolate({
                inputRange: [fillColor - fillColor, fillColor - (fillPartition * 6), fillColor - (fillPartition * 5), fillColor - (fillPartition * 4), fillColor - (fillPartition * 3), fillColor - (fillPartition * 2), fillColor - (fillPartition * 1), fillColor],
                outputRange: ['rgb(0,0,0)', 'rgb(255,0,0)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,0,255)', 'rgb(0,255,255)', 'rgb(255,255,0)', 'rgb(255,255,255)'],
            });
            this.path.setNativeProps({
                fill: extractBrush(color.__getAnimatedValue()),
            });
          });
    }