Skip to content

Shadow with negative spread doesn't match figma #466

Description

@AmjadHD

A continuation for #372 (comment)

Figma:

  1. create a 47x47px frame
  2. add a 29x29px rectangle at x=y=9
  3. set the corner radii to 6px
  4. set the fill to white and the opacity to 0.001% (it should become 0% when confirmed).

image
6. export the frame

Pixie:

procdrawShadow() =let image =newImage(47, 47)
let r =6f32let 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")

Figma:
shadow_figma_negative_spread_no_blur

  • 25x25px rect
  • corner radius is 4px (6 - 2):

Pixie:
shadow_pixie_negative_spread_no_blur

  • 25x25px rect
  • corner radius is 6px (unchanged):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions