Porytiles
Loading...
Searching...
No Matches
jasc_palette_saver.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4
5#include "gsl/pointers"
6
10
11namespace porytiles {
12
14class JascPaletteSaver final : public FilePaletteSaver {
15 public:
16 explicit JascPaletteSaver(gsl::not_null<const TextFormatter *> format) : format_{format} {}
17
18 [[nodiscard]] ChainableResult<void>
19 save(const Palette<Rgba32, palette::max_size> &palette, const std::filesystem::path &path) const override;
20
21 private:
22 const TextFormatter *format_;
23};
24
25} // namespace porytiles
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A service interface that saves a fixed-length Palette to a given file.
An implementation of FilePaletteSaver that saves palettes to JASC-PAL (Paintshop Pro) palette files.
JascPaletteSaver(gsl::not_null< const TextFormatter * > format)
ChainableResult< void > save(const Palette< Rgba32, palette::max_size > &palette, const std::filesystem::path &path) const override
A generic palette container for colors that support transparency checking.
Definition palette.hpp:45
Abstract base class for applying text styling with context-aware formatting.