NightmareXIV / ECommons

A library for Dalamud
MIT License
34 stars 40 forks source link

[FEATURE] Make texture can be SVG file! #24

Closed ArchiDog1998 closed 1 year ago

ArchiDog1998 commented 1 year ago

Hi, I make the texture can be SVG file.

And I link the repo SVG to make it, but it increased the size of this repo.

Here is an example.

if (ThreadLoadImageHandler.TryGetTextureWrap("https://github-readme-stats.vercel.app/api/pin/?username=NightmareXIV&repo=ECommons&theme=dark", out var texture))
{
    ImGui.Image(texture.ImGuiHandle, new Vector2(texture.Width, texture.Height));
}

And it shows like this in IMGUI! image

I hope you would like it.

Limiana commented 1 year ago

Hello, thank you for your pr! The problem is that adding extra nuget package to the lib would add it to all the plugins that use it. There is certain workaround however, so I still can add it slightly differently

ArchiDog1998 commented 1 year ago

It would be great if there is a way to convert data from svg to png without using a nuget package. Yesterday I researched for a long time and couldn't find a better way.