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
Support Focal property in Radial Gradient #1558
Comments
@reptofrog
but on your screen the focal point is outside the circle, right? or does inkskape prevent such cases? the focal support is reachable, but I'm no so sure about all of the corner cases... |
I found the answer to my previous comment - the behavior may be as I guessed if inkskape supports svg1.1, this was changed in svg2: https://www.w3.org/TR/SVG2/pservers.html#RadialGradientNotes |
Till now only the end circle values of the radial grad were supported. Now also the start circle values are. These are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Till now only the end circle values of the radial grad were supported. Now also the start circle values are. These are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Till now only the end circle values of the radial grad were supported. Now also the start circle values are. These are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Inkscape allows to place the focal point anywhere, there are no limits. Here is the example file with focal point set to be outside of circle and outside of canvas: https://github.com/thorvg/thorvg/assets/36744029/1c8cf513-2ff1-46c6-b6da-c4ea88b0d7c2 Here is one with focal point set to be outside of circle but inside the canvas: https://github.com/thorvg/thorvg/assets/36744029/7aa9172c-b2ef-40fd-b717-2cb61ec37d41 And finally, an example with focal point both inside the circle and inside the canvas: https://github.com/thorvg/thorvg/assets/36744029/86af735a-979f-4b0f-bba6-9e1cccc95524 It probably doesn't matter if the focal point lies outside of canvas or not, I added that example just in case. Interestingly, only the last one is displayed properly inside web browsers. (No SVG2 support yet?) However, none of these are displayed propely inside ThorVG Viewer. |
@reptofrog thanks for the svgs. could I also ask you to show what results do you expect? |
You can see the expected result here: #1555 (first image, a screenshot from Inkscape) I reported the bug because I was developing a game with Godot Engine and I noticed that my game's icon I've made (in .svg format) doesn't look the same as it does in Inkscape. I then identified that the focal point is what's not displayed properly. I figured out that it would be beneficial to other developers if this is fixed in ThorVG, since it's used in Godot. But as I understand now, a focal point that lies outside the circle is actually a new feature from SVG2, is that correct? It seems that even web browsers can't display such gradients properly yet. Thank you for working on this issue! |
@reptofrog thx for clarifications. |
Till now only the end circle values of the radial grad were supported. Now also the start circle values are interpreted - these are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Till now only the end circle values of the radial grad were supported. Now also the start circle values are interpreted - these are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Till now only the end circle values of the radial grad were supported. Now also the start circle values are interpreted - these are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
Till now only the end circle values of the radial grad were supported. Now also the start circle values are interpreted - these are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
I'm not sure what should happen according the SVG 2, if a part of the starting circle is outside the ending circle, like in the sample below:
but I think, after #1585 is merged we can close this issue as solved and if someone has a sample svg with such a problematic case, we can open a new issue |
Till now only the end circle values of the radial grad were supported. Now also the start circle values are interpreted - these are the focal point and the radius of the start circle. In the svg_loader support for the 'fr' attrib of the radial grad is added. @issue: thorvg#1558
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0 + Infrastructure Repository folder structure was make it more intuitive and coherent. "thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules) "thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features) + SVG related Fix stroke regression thorvg/thorvg#1670 Support stroke dash offset function thorvg/thorvg#1591 (comment) Support Focal property in Radial Gradient thorvg/thorvg#1558
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0 + Infrastructure Repository folder structure was make it more intuitive and coherent. "thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules) "thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features) + SVG related Fix stroke regression thorvg/thorvg#1670 Support stroke dash offset function thorvg/thorvg#1591 (comment) Support Focal property in Radial Gradient thorvg/thorvg#1558
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0 + Infrastructure Repository folder structure was make it more intuitive and coherent. "thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules) "thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features) + SVG related Fix stroke regression thorvg/thorvg#1670 Support stroke dash offset function thorvg/thorvg#1591 (comment) Support Focal property in Radial Gradient thorvg/thorvg#1558
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0 + Infrastructure Repository folder structure was make it more intuitive and coherent. "thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules) "thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features) + SVG related Fix stroke regression thorvg/thorvg#1670 Support stroke dash offset function thorvg/thorvg#1591 (comment) Support Focal property in Radial Gradient thorvg/thorvg#1558
The Radial Gradient lacks the "focal" property, which is commonly utilized in vector formats. It's necessary to provide support for this property.
#1555
The text was updated successfully, but these errors were encountered: