react-native-skia: can't be given negative value to the BoxShadow

Description

I just upgraded my Skia from 0.1.157 to latest. But seems like after 157 negative values can’t be applied to the BoxShadow component.

for example I had a component that I draw with FitBox and BoxShadow , after upgrading to the latest version of Skia, top shadows (which are applied with dx and dy by giving negative values, are not working anymore.

Did something changed from 157 to 162 ?

      <FitBox src={src} dst={rect(30, 15, w - 30, h - 10)} color={"green"}>
        <Box box={border} color={colorsComponent.neoBackgroundColor}>
       <BoxShadow dx={5} dy={12} blur={5} color={c1} />
         <BoxShadow dx={5} dy={12} blur={5} color={c2} />*/}
          <BoxShadow dx={-5} dy={-12} blur={5} color={"white"} />  // This is NOT working
          <BoxShadow dx={-5} dy={-12} blur={5} color={"green"} /> // Also this
        </Box>
      </FitBox>

as you can see here 2 shadows at the bottom are not working.

Version

0.1.162

Steps to reproduce

Snack, code example, screenshot, or link to a repository

none

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17

Most upvoted comments

Yes i ll do that