AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
SvgImageFactory.h
    1/*
    2 * AUI Framework - Declarative UI toolkit for modern C++20
    3 * Copyright (C) 2020-2025 Alex2772 and Contributors
    4 *
    5 * SPDX-License-Identifier: MPL-2.0
    6 *
    7 * This Source Code Form is subject to the terms of the Mozilla Public
    8 * License, v. 2.0. If a copy of the MPL was not distributed with this
    9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
   10 */
   11#pragma once
   12
   13
   14#include "AUI/Image/IImageFactory.h"
   15#include "AUI/Common/AByteBufferView.h"
   16
   17namespace lunasvg {
   18    class Document;
   19}
   20
   21class API_AUI_IMAGE SvgImageFactory: public IImageFactory {
   22public:
   23    SvgImageFactory(AByteBufferView buf);
   24    ~SvgImageFactory();
   25    AImage provideImage(const glm::ivec2& size) override;
   26
   27    glm::ivec2 getSizeHint() override;
   28
   29private:
   30    std::unique_ptr<lunasvg::Document> mImpl;
   31};
   32
   33
Acts like std::string_view but for AByteBuffer.
Definition AByteBufferView.h:24
Owning image representation.
Definition AImage.h:25
Produces images by the specified size.
Definition IImageFactory.h:20
glm::ivec2 getSizeHint() override