Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ee15100
init
aismann Aug 19, 2026
e3d225f
Add copyright
aismann Aug 19, 2026
dbc9887
Committing clang-format changes
axmol-bot Aug 19, 2026
d9b74b6
clean tester code
aismann Aug 19, 2026
546c00a
Committing clang-format changes
axmol-bot Aug 19, 2026
5a1085d
Added AX_ENABLE_3RD_SVG which control the usebility of SVG
aismann Aug 20, 2026
e26ae64
Merge branch 'Sprite_from_SVG_files' of https://github.com/aismann/ax…
aismann Aug 20, 2026
ccca2ee
Committing clang-format changes
axmol-bot Aug 20, 2026
4947d9d
add #if AX_ENABLE_3RD_SVG on Image.cpp
aismann Aug 20, 2026
6afe679
Merge branch 'Sprite_from_SVG_files' of https://github.com/aismann/ax…
aismann Aug 20, 2026
17a672a
Committing clang-format changes
axmol-bot Aug 20, 2026
5f232d8
Update CMakeLists.txt
aismann Aug 20, 2026
e28f36d
renamed AX_ENABLE_3RD_SVG and added it to CMakeOptions.md (sort the …
aismann Aug 20, 2026
ae506d4
remove AX_WITH_SVG, improve cpp-tests
aismann Aug 20, 2026
5128a60
set to default: option(AX_ENABLE_SVG "Build SVG support" OFF)
aismann Aug 20, 2026
c0b905d
set AX_ENABLE_SVG ON on cpp-tests
aismann Aug 21, 2026
cc4f6a4
Improve SVG processor check
halx99 Aug 21, 2026
3d8d900
Implement SVG support as extension
halx99 Aug 21, 2026
cd1f422
Fix source lint
halx99 Aug 21, 2026
d74d3da
Committing clang-format changes
axmol-bot Aug 21, 2026
6988459
up
halx99 Aug 21, 2026
eda9dc4
Fix compile
halx99 Aug 22, 2026
97e5556
Remove unnecessary file changes
halx99 Aug 22, 2026
a1d65f6
Add copyright notice
halx99 Aug 22, 2026
70d53d2
Fix source lint
halx99 Aug 22, 2026
7f0eda9
Refactor SVG support into isolated extension
halx99 Aug 23, 2026
12864bb
Fix source lint
halx99 Aug 23, 2026
de75968
Remove unnecessary file changes
halx99 Aug 23, 2026
aa88157
Improve cmake
halx99 Aug 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:

- name: Build
shell: pwsh
run: ./tools/cmdline/axmol -p wasm -O3 -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8,-DAX_ENABLE_VR=ON' -j2 -t 'cpp-tests,fairygui-tests,lua-tests'
run: ./tools/cmdline/axmol -p wasm -O3 -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_ENABLE_EXT_SVG=ON,-DAX_WASM_THREADS=8,-DAX_ENABLE_VR=ON' -j2 -t 'cpp-tests,fairygui-tests,lua-tests'
- uses: actions/upload-artifact@v6
with:
name: wasm
Expand Down
1 change: 1 addition & 0 deletions 1k/build.profiles
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ kcp=2.1.1
lz4=v1.10.0
sample-assets=master
live2d-core=5.5
lunasvg=v3.5.0
openxr=release-1.1.62
tracy=v0.13.1
# --- endregion
3 changes: 3 additions & 0 deletions 1k/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"openxr": {
"sources": { "origin": "https://github.com/KhronosGroup/OpenXR-SDK.git" }
},
"lunasvg": {
"sources": { "origin": "https://github.com/sammycage/lunasvg.git" }
},
"sample-assets": {
"sources": {
"origin": "https://github.com/axmolengine/axmol-sample-assets.git",
Expand Down
14 changes: 14 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,20 @@ if(AX_WITH_TRACY)
ax_add_3rd(${tracy_SOURCE_DIR} TARGETS TracyClient)
endif()

# SVG
if(AX_ENABLE_EXT_SVG)
_1kfetch(lunasvg)
ax_add_3rd(${lunasvg_SOURCE_DIR}
TARGETS lunasvg
OPTIONS
"USE_SYSTEM_PLUTOVG OFF"
"LUNASVG_BUILD_EXAMPLES OFF"
)
if(TARGET plutovg)
set_property(TARGET plutovg PROPERTY AX_SKIP_SDK_EXPORT ON)
endif()
endif()

# yasio
ax_add_3rd(yasio)

Expand Down
6 changes: 5 additions & 1 deletion 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@
- Version: 3.0.21
- License: Apache-2.0

## lunasvg
- [![Upstream](https://img.shields.io/github/v/tag/sammycage/lunasvg?label=Upstream)](https://github.com/sammycage/lunasvg)
- Version: managed by `1k/build.profiles` and fetched only when `AX_ENABLE_EXT_SVG=ON`
- License: MIT

## png
- [![Upstream](https://img.shields.io/github/v/tag/glennrp/libpng?label=Upstream)](https://github.com/glennrp/libpng)
- Version: 1.6.58
Expand Down Expand Up @@ -283,4 +288,3 @@
- [![Upstream](https://img.shields.io/github/v/tag/madler/zlib?label=Upstream)](https://github.com/madler/zlib)
- Version: 1.3.2
- License: zlib

41 changes: 21 additions & 20 deletions CMakeOptions.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
# The axmol CMake options

## The options for axmol engine
## The options for axmol engine (please sort them alphabetically. Thanks.)
- AX_BUILD_TESTS: whether build test porojects: cpp-tests, lua-tests, fairygui-tests, default: `TRUE`
- AX_ENABLE_XXX for core feature:
- AX_ENABLE_MSEDGE_WEBVIEW2: whether enable msedge webview2, default: `TRUE`
- AX_ENABLE_MFMEDIA: whether enable microsoft media foundation for windows video player support, default: `TRUE`
- AX_ENABLE_VLC_MEDIA: whether enable libvlc media, default: `TRUE on Linux`, `FALSE on Windows`, not support other platforms
- AX_ENABLE_HTTP: whether enable http client, default: `TRUE`
- AX_ENABLE_WEBSOCKET: whether enable websockets client, default: `TRUE`
- AX_ENABLE_3D: whether to enable 3D support, default: `TRUE`
- AX_ENABLE_PHYSICS_3D: whether to enable physics3d support, default: `TRUE`
- AX_ENABLE_NAVMESH: whether to enable NavMesh support default: `TRUE`
- AX_ENABLE_VIDEO: whether to enable video player, default: `TRUE`
- AX_ENABLE_AUDIO: whether to enable audio support, default: `TRUE`
- AX_ENABLE_HTTP: whether enable http client, default: `TRUE`
- AX_ENABLE_MFMEDIA: whether enable microsoft media foundation for windows video player support, default: `TRUE`
- AX_ENABLE_MSEDGE_WEBVIEW2: whether enable msedge webview2, default: `TRUE`
- AX_ENABLE_NAVMESH: whether to enable NavMesh support default: `TRUE`
- AX_ENABLE_OPUS: whether to enable audio engine play .opus files support, default: `TRUE`
- AX_ENABLE_PHYSICS_3D: whether to enable physics3d support, default: `TRUE`
- AX_ENABLE_EXT_SVG: whether to enable the SVG extension, default: `FALSE`
- AX_ENABLE_VIDEO: whether to enable video player, default: `TRUE`
- AX_ENABLE_VLC_MEDIA: whether enable libvlc media, default: `TRUE on Linux`, `FALSE on Windows`, not support other platforms
- AX_ENABLE_VR: whether to enable generic VR renderer support, status: `experimental`, default: `FALSE`
- AX_ENABLE_WAYLAND: whether to enable linux wayland, default: `FALSE`
- AX_ENABLE_WEBSOCKET: whether enable websockets client, default: `TRUE`
- AX_USE_XXX:
- AX_USE_LUAJIT: whether use luajit, default: `FALSE`, use plainlua
- AX_ENABLE_EXT_XXX for extensions
- AX_ENABLE_EXT_GUI: the traditional GUI extension, default: `TRUE`
- AX_ENABLE_EXT_ASSETMANAGER: the assetmanager extension, default: `TRUE`
- AX_ENABLE_EXT_PARTICLE3D: the particle3d extension, default: `TRUE`
- AX_ENABLE_EXT_PHYSICS_NODE: the physics_node extension, default: `TRUE`
- AX_ENABLE_EXT_SPINE: the spine extension, default: `TRUE`
- AX_ENABLE_EXT_DRAGONBONES: the dragonbones extension: `TRUE`
- AX_ENABLE_EXT_COCOSTUDIO: the cocosstudio extension for load .csb: `TRUE`
- AX_ENABLE_EXT_DRAGONBONES: the dragonbones extension: `TRUE`
- AX_ENABLE_EXT_EFFEKSEER: the effekseer extension, default: `FALSE`
- AX_ENABLE_EXT_FAIRYGUI: the fairygui extension, default: `TRUE`
- AX_ENABLE_EXT_GUI: the traditional GUI extension, default: `TRUE`
- AX_ENABLE_EXT_IMGUI: the imgui extension, support macos,win,linux,android, default: `TRUE`
- AX_ENABLE_EXT_INSPECTOR: the imgui inspector extension, support macos,win,linux,android, default: `TRUE`
- AX_ENABLE_EXT_SDFGEN: the SDF atlas generator, default: `TRUE`
- AX_ENABLE_EXT_LIVE2D: the live2d extension, default: `FALSE`
- AX_ENABLE_EXT_EFFEKSEER: the effekseer extension, default: `FALSE`
- AX_ENABLE_EXT_JSONDEFAULT: the UserDefault based on json, default: `FALSE`
- AX_ENABLE_EXT_LIVE2D: the live2d extension, default: `FALSE`
- AX_ENABLE_EXT_LUA: the lua extension, default: `TRUE`
- AX_ENABLE_EXT_PARTICLE3D: the particle3d extension, default: `TRUE`
- AX_ENABLE_EXT_PHYSICS_NODE: the physics_node extension, default: `TRUE`
- AX_ENABLE_EXT_SDFGEN: the SDF atlas generator, default: `TRUE`
- AX_ENABLE_EXT_SPINE: the spine extension, default: `TRUE`
- AX_WITH_XXX: usually user don't need care it
- AX_RENDER_API: specify render api, valid values are: `auto`, `gl`, `mtl`, `d3d11`, `d3d12`, `vk`, default: `auto`.
You may also specify multiple APIs separated by semicolons, e.g. "-DAX_RENDER_API=vk;gl" This will enable both Vulkan and OpenGL backends in the build.
Expand All @@ -47,13 +48,13 @@
- `navigator.hardwareConcurrency`: will be emitted in the JS code which will use the number of cores the browser reports
- `auto`: Use cmake to detect host processor count
default is: `navigator.hardwareConcurrency`
- AX_WASM_SHELL_FILE: specify the wasm shell file, by default use `${_AX_ROOT}/axmol/platform/wasm/shell_minimal.html`
- AX_WASM_ASSETS_PRELOAD_FILE: Whether enable to bundle the assets to a .data file and preload them into an IndexedDB cache at first launch (`--preload-file`), otherwise bundle them into the wasm file itself and don't use the IndexedDB at all (`--embed-file`)", default `TRUE`
- AX_WASM_ENABLE_DEVTOOLS: whether enable web devtools aka `pause`, `resume`, `step` buttons in webpage, default: `TRUE`
- AX_WASM_GENERATE_SYMBOL_FILE: Generate a symbol file for the built wasm file, default `FALSE`
- AX_WASM_INITIAL_MEMORY: set the wasm initial memory size, default `1024MB`
- AX_WASM_ISA_SIMD: specify the wasm simd intrinsics type, default `none`, supports `sse`, `neon`, note the `wasm-simd` not support by axmol yet
- AX_WASM_SHELL_FILE: specify the wasm shell file, by default use `${_AX_ROOT}/axmol/platform/wasm/shell_minimal.html`
- AX_WASM_TIMING_USE_TIMEOUT: force the wasm emscripten loop timing to use `Timeout` with FPS value of `Application::setAnimationInterval` (app still run on focus lost), default is `FALSE` with timing `requestAnimationFrame` (no run on focus lost). See https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_set_main_loop_timing
- AX_WASM_ASSETS_PRELOAD_FILE: Whether enable to bundle the assets to a .data file and preload them into an IndexedDB cache at first launch (`--preload-file`), otherwise bundle them into the wasm file itself and don't use the IndexedDB at all (`--embed-file`)", default `TRUE`
- AX_WASM_GENERATE_SYMBOL_FILE: Generate a symbol file for the built wasm file, default `FALSE`


## The options for axmol apps
Expand Down
1 change: 1 addition & 0 deletions axmol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ cmake_dependent_option(AX_ENABLE_EXT_INSPECTOR "Build extension Inspector" ${AX_
cmake_dependent_option(AX_ENABLE_EXT_SDFGEN "Build extension SDFGen" ${AX_EXT_HINT} "AX_ENABLE_EXT_IMGUI" OFF)

option(AX_ENABLE_EXT_JSONDEFAULT "Build extension JSONDefault" ${AX_EXT_HINT})
option(AX_ENABLE_EXT_SVG "Build extension SVG" OFF)
set(_AX_THIRDPARTY_NAME "3rdparty" CACHE INTERNAL "")

if(WIN32)
Expand Down
5 changes: 5 additions & 0 deletions cmake/Modules/AXBuildHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,11 @@ function(ax_collect_sdk_targets dir out_list)

# Filter targets
foreach(tg IN LISTS local_targets)
get_target_property(skip_export ${tg} AX_SKIP_SDK_EXPORT)
if(skip_export)
continue()
endif()

# Check target type (Static, Shared, Interface, Utility, etc.)
get_target_property(tg_type ${tg} TYPE)

Expand Down
2 changes: 2 additions & 0 deletions cmake/Modules/AXLinkHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
ax_config_pred(${APP_NAME} AX_ENABLE_AUDIO)
ax_config_pred(${APP_NAME} AX_ENABLE_VR)
ax_config_pred(${APP_NAME} AX_ENABLE_OPENXR)
ax_config_pred(${APP_NAME} AX_ENABLE_EXT_SVG)
# compile defines can't inherit when link prebuilts, so need to apply the
# profiler backend define manually — mirrors the logic in axmol/CMakeLists.txt
ax_apply_profiler_backend(${APP_NAME} PRIVATE)
Expand Down Expand Up @@ -201,6 +202,7 @@ function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
ax_link_pred(AX_ENABLE_EXT_INSPECTOR LIBS Inspector INCLUDES "${AX_ROOT_DIR}/extensions/Inspector/src")
ax_link_pred(AX_ENABLE_EXT_SDFGEN LIBS SDFGen INCLUDES "${AX_ROOT_DIR}/extensions/SDFGen/src")
ax_link_pred(AX_ENABLE_EXT_GUI LIBS GUI INCLUDES "${AX_ROOT_DIR}/extensions/GUI/src" "${AX_ROOT_DIR}/extensions/GUI/src/GUI")
ax_link_pred(AX_ENABLE_EXT_SVG LIBS svg lunasvg plutovg INCLUDES "${AX_ROOT_DIR}/extensions/svg/src")
ax_link_pred(AX_ENABLE_EXT_FAIRYGUI LIBS fairygui INCLUDES "${AX_ROOT_DIR}/extensions/fairygui/src" "${AX_ROOT_DIR}/extensions/fairygui/src/fairygui")
ax_link_pred(AX_ENABLE_EXT_LIVE2D LIBS Live2D Live2DCubismCore INCLUDES "${AX_ROOT_DIR}/extensions/Live2D/Framework/src" "${AX_ROOT_DIR}/extensions/Live2D/Core/include")
ax_link_pred(AX_ENABLE_EXT_EFFEKSEER LIBS EffekseerAxmol Effekseer EffekseerRendererCommon INCLUDES
Expand Down
4 changes: 4 additions & 0 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ if(AX_ENABLE_EXT_JSONDEFAULT)
add_subdirectory(JSONDefault)
endif()

if(AX_ENABLE_EXT_SVG)
add_subdirectory(svg)
endif()

if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/local.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/local.cmake")
endif()
Expand Down
2 changes: 2 additions & 0 deletions extensions/axmol-ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@
#include "Particle3D/src/Particle3D/Particle3DRender.h"
#include "Particle3D/src/Particle3D/ParticleSystem3D.h"
#include "Particle3D/src/Particle3D/PU/PUParticleSystem3D.h"

#include "svg/src/SVG.h"
14 changes: 14 additions & 0 deletions extensions/svg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(target_name svg)

add_library(${target_name} STATIC
src/SVG.h
src/SVG.cpp
)

target_include_directories(${target_name}
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src
)

target_link_libraries(${target_name} lunasvg)

ax_setup_ext_config(${target_name})
145 changes: 145 additions & 0 deletions extensions/svg/src/SVG.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/****************************************************************************
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).

https://axmol.dev/

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "SVG.h"

#include "axmol/2d/Sprite.h"
#include "axmol/base/Director.h"
#include "axmol/base/Logging.h"
#include "axmol/platform/FileUtils.h"
#include "axmol/platform/Image.h"
#include "axmol/renderer/TextureCache.h"

#include <lunasvg.h>

#include <string.h>
#include <string>

namespace
{
bool isInvalidSize(int width, int height)
{
return width == 0 || height == 0 || width < -1 || height < -1;
}

std::string makeTextureKey(std::string_view path, int width, int height)
{
std::string key(path);
key += "#svg:";
key += std::to_string(width);
key += 'x';
key += std::to_string(height);
return key;
}
} // namespace

namespace ax::ext
{

Texture2D* loadSVGTexture(std::string_view path, int width, int height)
{
if (path.empty() || isInvalidSize(width, height))
{
AXLOGW("Invalid SVG path or render size: {} ({}x{})", path, width, height);
return nullptr;
}

auto* fileUtils = FileUtils::getInstance();
auto* director = Director::getInstance();
if (!fileUtils || !director || !director->getTextureCache())
return nullptr;

const auto fullPath = fileUtils->fullPathForFilename(path);
if (fullPath.empty())
{
AXLOGW("SVG file not found: {}", path);
return nullptr;
}

const auto cacheKey = makeTextureKey(fullPath, width, height);
auto* textureCache = director->getTextureCache();
if (auto* texture = textureCache->getTextureForKey(cacheKey))
return texture;

auto data = fileUtils->getDataFromFile(fullPath);
if (data.isNull())
{
AXLOGW("Failed to read SVG file: {}", fullPath);
return nullptr;
}

auto document = lunasvg::Document::loadFromData(reinterpret_cast<const char*>(data.getBytes()),
static_cast<size_t>(data.getSize()));
if (!document)
{
AXLOGW("Failed to parse SVG file: {}", fullPath);
return nullptr;
}

auto bitmap = document->renderToBitmap(width, height);
if (bitmap.isNull())
{
AXLOGW("Failed to render SVG file: {}", fullPath);
return nullptr;
}

bitmap.convertToRGBA();

const auto bitmapWidth = bitmap.width();
const auto bitmapHeight = bitmap.height();
const auto bitmapStride = bitmap.stride();
Data pixels;
auto* pixelData = pixels.resize(static_cast<ssize_t>(bitmapWidth) * bitmapHeight * 4);
if (!pixelData)
{
AXLOGW("Failed to allocate SVG bitmap: {}", fullPath);
return nullptr;
}

const auto* source = bitmap.data();
for (int y = 0; y < bitmapHeight; ++y)
{
memcpy(pixelData + static_cast<size_t>(y) * bitmapWidth * 4, source + static_cast<size_t>(y) * bitmapStride,
static_cast<size_t>(bitmapWidth) * 4);
}

auto* image = new Image();
if (!image->initWithRawData(pixelData, static_cast<ssize_t>(pixels.size()), bitmapWidth, bitmapHeight, 8, false))
{
image->release();
AXLOGW("Failed to create image from SVG: {}", fullPath);
return nullptr;
}

auto* texture = textureCache->addImage(image, cacheKey);
image->release();
return texture;
}

Sprite* createSVGSprite(std::string_view path, int width, int height)
{
auto* texture = loadSVGTexture(path, width, height);
return texture ? Sprite::createWithTexture(texture) : nullptr;
}

} // namespace ax::ext
43 changes: 43 additions & 0 deletions extensions/svg/src/SVG.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/****************************************************************************
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).

https://axmol.dev/

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#pragma once

#include "extensions/ExtensionExport.h"
#include "extensions/ExtensionMacros.h"

#include <string_view>

namespace ax
{
class Sprite;
class Texture2D;

namespace ext
{

AX_EXT_API Texture2D* loadSVGTexture(std::string_view path, int width = -1, int height = -1);
AX_EXT_API Sprite* createSVGSprite(std::string_view path, int width = -1, int height = -1);

} // namespace ext
} // namespace ax
Loading