Impossible Gradients
const Example = () => {
const gradient = useLinearGradient({
startX: width * 0.1,
startY: height * 0.25,
endX: width * 0.9,
endY: height * 0.75,
stops: [
{ offset: 0, color: 'red' },
{ offset: 1, color: 'blue' },
],
});
return (
<>
<Rectangle
style={{ stroke: gradient }}
/>
<Text
style={{ fill: gradient }}
/>
</>
);
};