Shadow with negative spread doesn't match figma
AmjadHD opened this issue · comments
Amjad Ben Hedhili commented
A continuation for #372 (comment)
Figma:
- create a 47x47px frame
- add a 29x29px rectangle at x=y=9
- set the corner radii to 6px
- set the fill to white and the opacity to 0.001% (it should become 0% when confirmed).
Pixie:
proc drawShadow() =
let image = newImage(47, 47)
let r = 6f32
let path = newPath()
path.roundedRect(rect(9, 9, 29, 29), r, r, r, r)
image.fillPath(path, "white")
image.shadow(
offset = vec2(0, 0),
spread = -2,
blur = 0,
color = color(0, 0, 0, 0.4)
).writeFile("shadow_pixie_negative_spread_no_blur.png")
- 25x25px rect
- corner radius is 4px (6 - 2):
- 25x25px rect
- corner radius is 6px (unchanged):
Andre von Houck commented
Thank you for the issue!
You are totally right. I have looked into this and we don't match.
We will fix this eventually.
Amjad Ben Hedhili commented
I believe shadow()
's logic is correct as is, Are you going to add box-shadow()
function ?