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

Box shadow on transparent rectangle with border isn't rendered correctly #6581

Open
tronical opened this issue Oct 17, 2024 · 2 comments
Open
Labels
a:renderer-femtovg Femtovg renderer (mS) a:renderer-skia Skia Renderer (mS) a:renderer-software Software Renderer (mO,bF) bug Something isn't working

Comments

@tronical
Copy link
Member

SlintPad link.

The following rectangle has a border but is otherwise transparent. The shadow cast from this should only contain he outline, not the transparent fill.

export component Demo {
    width: 300px;
    height: 300px;

    Rectangle {
       x: 10px;
       y: 10px;
       width: 150px;
       height: 150px;
       border-width: 10px;
       border-color: green;

       drop-shadow-blur: 5px;
       drop-shadow-offset-x: 10px;
       drop-shadow-offset-y: 10px;
       drop-shadow-color: red;
    }
}
@tronical tronical added bug Something isn't working a:renderer-skia Skia Renderer (mS) a:renderer-femtovg Femtovg renderer (mS) a:renderer-software Software Renderer (mO,bF) labels Oct 17, 2024
@szecket
Copy link
Member

szecket commented Oct 17, 2024

this can be extended to any fill with transparency (or any border with transparency for that matter although I'm not sure you can render that on the box itself right now)
we could multiply the pixel in the shadow by the colour (including alpha) of the pixel in the casting object.
examples.
image png of line work casting shadow would right now be a rectangle
image of stain glass casting shadow...
image

@szecket
Copy link
Member

szecket commented Oct 17, 2024

if you're doing it by pixel then png would also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:renderer-femtovg Femtovg renderer (mS) a:renderer-skia Skia Renderer (mS) a:renderer-software Software Renderer (mO,bF) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants