// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
//
// Rasterize a (two-tone) SVG to a themed RGBA GPU texture via nanosvg. Used for the DragonX logo /
// custom emoji: the darker fill becomes `bodyColor` (the theme accent), the light fill `detailColor`.

#pragma once

#include "imgui.h"

namespace dragonx {
namespace util {

// Rasterize `svgText` (nul-terminated SVG markup) to a texture of width `pxSize` (height follows the
// SVG aspect). Fills are recolored by brightness — light fills -> detailColor, darker fills -> bodyColor
// (both forced opaque). Returns false on parse/rasterize/upload failure; on success *outTex is a texture
// the caller owns (release via util::DestroyTexture). Safe to call off the initial frame (needs a live
// GL/DX device, like the other texture loaders).
bool LoadTextureFromSvg(const char* svgText, int pxSize, ImU32 bodyColor, ImU32 detailColor,
                        ImTextureID* outTex, int* outW, int* outH);

} // namespace util
} // namespace dragonx
