group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HudSvgRaster.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "HudTypes.hpp"
7
8#include <filesystem>
9#include <string_view>
10#include <vector>
11
13{
14 int width = 0;
15 int height = 0;
16 std::vector<unsigned char> rgba;
17
18 [[nodiscard]] bool empty() const { return width <= 0 || height <= 0 || rgba.empty(); }
19};
20
21[[nodiscard]] std::string_view hudSvgFilename(HudIcon id);
22[[nodiscard]] HudIcon hudIconFromFilename(std::string_view filename);
23[[nodiscard]] HudSvgBitmap rasterizeHudSvg(const std::filesystem::path& path, int width, int height);
24
HudIcon hudIconFromFilename(std::string_view filename)
Definition HudSvgRaster.cpp:98
HudSvgBitmap rasterizeHudSvg(const std::filesystem::path &path, int width, int height)
Definition HudSvgRaster.cpp:107
std::string_view hudSvgFilename(HudIcon id)
Definition HudSvgRaster.cpp:89
Shared types for the HUD system.
HudIcon
Icon identifiers for the HUD icon atlas.
Definition HudTypes.hpp:63
Definition HudSvgRaster.hpp:13
std::vector< unsigned char > rgba
Definition HudSvgRaster.hpp:16
bool empty() const
Definition HudSvgRaster.hpp:18
int width
Definition HudSvgRaster.hpp:14
int height
Definition HudSvgRaster.hpp:15