Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Clipped shape filled with gradient shows incorrectly #738

Closed
ujeenator opened this issue Jul 19, 2018 · 1 comment
Closed

[bug] Clipped shape filled with gradient shows incorrectly #738

ujeenator opened this issue Jul 19, 2018 · 1 comment

Comments

@ujeenator
Copy link

What I expect:
screen shot 2018-07-19 at 11 14 10 pm

What I get:
img_0551

Code:

<Svg width={200} height={200}>
  <Defs>
    <RadialGradient id='gradient' r='50%' cx='50%' cy='50%' fx='50%' fy='50%'>
      <Stop offset='0' stopColor='red' stopOpacity='1' />
      <Stop offset='1' stopColor='red' stopOpacity='0' />
    </RadialGradient>
    <ClipPath id='cut-off-bottom'>
      <Rect x='0' y='0' width='200' height='100' />
    </ClipPath>
  </Defs>
  <Circle
    cx='100'
    cy='100'
    r='100'
    clipPath='url(#cut-off-bottom)'
    fill='url(#gradient)'
  />
</Svg>
@msand
Copy link
Collaborator

msand commented Sep 1, 2018

I have a fix available, could you test it? msand@11a5752

@msand msand closed this as completed in 11a5752 Sep 15, 2018
JackWillie added a commit to JackWillie/react-native-svg that referenced this issue Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants