Init feature: Sprite from SVG files - #3288
Conversation
|
/clang-format |
|
@halx99 |
|
/clang-format |
|
Add some SVG files to the axmol-sample-assets: |
|
I personally feel that it should be off by default, and if it becomes widely used, then that would be a reason to set it to on by default later. Also, in |
I agreed. |
|
And I think SVG support should becomes an optional Axmol extension and is disabled by default. |
Having it as an extension would make more sense. |
I agree too! |
|
Planned changes:
Another, easier way! is to switch on/off via #defines like its used for platforms or other extensions: => No big changes needed (only hide SVG source snippet on class sprite/images/...) @rh101 , @halx99 |
That won't stop the 3rd party SVG library from being built. The whole point is that we have a way to enable or disable the building of the library, otherwise it will take more time to build and wasted space in the final binary. The cmake option to enable/disable the 3rd party SVG library should control everything. Enabling this should automatically add a define to enable the Axmol-specific SVG support in For example, in Does that make sense? |
@rh101 |
|
AX_WITH_XXX options are internal and undocumented, and should not be used as user-facing feature switches. Third-party dependencies should instead be enabled automatically based on Axmol feature options such as AX_ENABLE_EXT_XXX. |
|
@aismann I received a request for review notification, but I'm not sure why, since nothing has changed since the earlier conversation. Was the review request accidental? |
|
/clang-format |
|
❌ Formatting failed. Please check the GitHub Actions logs for details. |
|
/clang-format |
|
@halx99 |
|
I prefer implement svg support as extension feature currently. |
|
This PR still needs to be redesigned to avoid unnecessary intrusion into and complication of the core architecture. |
The goal of this PR is/was to show an effektive way for the feature: create sprites from SVGs. |
|
I kept this PR focused on its original goal: providing a practical way to create sprites from SVG files. The latest commits eeps the SVG implementation isolated in the ax::ext namespace. SVG can be loaded explicitly with createSVGSprite() or loadSVGTexture(), while the Core remains unaware of SVG-specific details. This keeps the feature focused and provides a clean foundation for SVG support in Axmol v3. |
|
I’ve finished my work. |
My original concern was the source code would be compiled in without a way to disable it, since it may not be a feature that is widely used. Having it as an extension makes sense, and doesn't seem to limit its usage in any way. |


Describe your changes
New Feature: Sprite from SVG files
History:
=> Aborted: To much effort and maintenance in the future of Axmol lifecircle
Good rendering but not all was as expected.
=> Aborted: This project is not actively maintained.
=> Seems to be a good 3rdparty lib for feature “Sprite from SVG files”
but we let it still experimental!
Issue ticket number and link
#3243
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."I have performed a self-review of my code.
Optional:
For core/new feature PR
Axmol 3.x ------------------------------------------------------------
For each 3.x PR