Porytiles
Loading...
Searching...
No Matches
jasc_pal_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
16class JascPalSaver final : public FilePalSaver {
17 public:
18 explicit JascPalSaver(gsl::not_null<const TextFormatter *> format) : format_{format} {}
19
20 [[nodiscard]] ChainableResult<void>
21 save(const Palette<Rgba32, pal::max_size> &pal, const std::filesystem::path &path) const override;
22
23 private:
24 const TextFormatter *format_;
25};
26
27} // 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 FilePalSaver that saves palettes to JASC-PAL (Paintshop Pro) pal files.
ChainableResult< void > save(const Palette< Rgba32, pal::max_size > &pal, const std::filesystem::path &path) const override
JascPalSaver(gsl::not_null< const TextFormatter * > format)
A generic palette container for colors that support transparency checking.
Definition palette.hpp:47
Abstract base class for applying text styling with context-aware formatting.