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

Shape effect SVG does not render properly #5198

Open
sslupsky opened this issue Feb 13, 2025 · 8 comments
Open

Shape effect SVG does not render properly #5198

sslupsky opened this issue Feb 13, 2025 · 8 comments

Comments

@sslupsky
Copy link
Contributor

sslupsky commented Feb 13, 2025

Describe the bug
Certain construction of SVG's do not render properly. In particular, shapes that are generated by subtraction ignore the subtrahend.

For instance, a torus shape created by two concentric circles where the inner circle is subtracted from the outer circle. The shape effect renders this shape as a filled circle instead of a torus.

Moreover, when an SVG is selected the Rotation setting is dimmed and it is not possible to apply a rotation to the SVG.

To Reproduce
Steps to reproduce the behavior:
Add the shape effect
Select Object to Draw as SVG
Use the attached torus SVG file

Expected behavior
The torus should be rendered as a torus.

Screenshots
This screenshot illustrates rendering a torus shape that is formed from a circle defined as found in the attached file circle.svg
Image
Image

This screenshot illustrates rendering a torus shape that is formed from a circle defined as found in the attached file circle2.svg
Image
Image

shape effect svg.xsq.zip

@derwin12
Copy link
Collaborator

Just a note that this is reported already .. "subtraction" is not rendering. #5194

@sslupsky
Copy link
Contributor Author

sslupsky commented Feb 14, 2025

@derwin12 I don't think that is quite the same issue. The "subtraction" I am referring to is related to how the SVG image is created and not the layer effects in xLights. I provided two different SVG files. One renders properly (circle.svg) and the other does not (circle2.svg).

@derwin12
Copy link
Collaborator

Can you do a tools->package sequence. I don't have the necessary files to see/replicate your issue.
Comparing my version to 2024.05 shows no difference.
(Basically exploading circles)

Or are you saying you CODED the .svg file and it should look differently?

Image

@computergeek1507
Copy link
Member

Currently the shape effect only uses the SVG for the shape, the color is not used

@derwin12
Copy link
Collaborator

Could he convert the svg to png .. and then just use that somehow?
(btw I see what Scott is saying .. the code is just pulling the shapes of the svg into the structure)
.png below.
Image

@sslupsky
Copy link
Contributor Author

Can you do a tools->package sequence. I don't have the necessary files to see/replicate your issue. Comparing my version to 2024.05 shows no difference. (Basically exploading circles)

Or are you saying you CODED the .svg file and it should look differently?

I created the two SVG files using a vector graphics application. The first SVG (circle.svg) is a single brush stroke where the width of the brush determines the outer and inner diameter of the torus (donut). The second SVG (circle2.svg) is two concentric circles where the smaller inner circle is subtracted from the larger outer circle. The outer diameter is determined by the larger circle and the inner diameter is determined by the smaller circle.

I attached packaged sequence.

Currently the shape effect only uses the SVG for the shape, the color is not used

I added an ON effect to the background and overlayed the circles so it is easier to see what is going on. There should be a "hole" in the center of the torus that is transparent. For circle.svg, the hole is there. For circle2.svg, the hole is filled in.

shape effect svg.xsqz.zip

@sslupsky
Copy link
Contributor Author

Could he convert the svg to png .. and then just use that somehow?

The Shape effect does not have support for a PNG.

I see what Scott is saying .. the code is just pulling the shapes of the svg into the structure) .png below.

In my experience, the Shape effect brings along the colour as well. You can see the same colours from the circle2.svg image in the sequence.

@derwin12
Copy link
Collaborator

Just a note that the svg support is just from an (old) small svg library with limited functionality.

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

3 participants