/
ArtemNech
/
simpleOpenGL
Обзор
Документация
Войти
/
ArtemNech
/
simpleOpenGL
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
backend/ogl_sys/image_element.h
47 строк
1 KB
Artem Nechitaylenko
Qt GUI isolated from backend except QEvent. Need fix
18 май 2026, 13:41
18 май 2026, 13:41
f09d1f2
Код
Авторство
О чём код?
// // Created by artem on 22.10.25. // #ifndef NYM_PROJECT_IMAGE_ELEMENT_H #define NYM_PROJECT_IMAGE_ELEMENT_H #include "../graphics-units/NRectF.h" #include <vector> namespace ngraph { enum class ImageType { STATIC, // Часть дизайна (иконки, фон) DYNAMIC // Статусы, индикаторы (меняются при выполнении) }; struct IImageElement { std::vector<uint8_t> bytes; std::string imageId; ImageType type{ImageType::STATIC}; NRectF rect; float opacity{1.0f}; std::string originalPath; int figureType{0}; IImageElement() = default; IImageElement(std::string id, std::vector<uint8_t> imageBytes, ImageType imageType, const NRectF &imageRect) : bytes(std::move(imageBytes)) , imageId(std::move(id)) , type(imageType) , rect(imageRect) {} [[nodiscard]] bool isValid() const { return !bytes.empty() && !imageId.empty(); } }; } // namespace ngraph #endif //NYM_PROJECT_IMAGE_ELEMENT_H