Added text style modifiers
This commit is contained in:
parent
640d4673ad
commit
b43fedaaac
11 changed files with 385 additions and 34 deletions
|
|
@ -4,9 +4,22 @@
|
|||
#include <nlohmann/json.hpp>
|
||||
#include <boost/multiprecision/cpp_int.hpp>
|
||||
#include "FixedPoint.hpp"
|
||||
#include <include/core/SkString.h>
|
||||
|
||||
#include <include/core/SkColor.h>
|
||||
|
||||
template <class Archive> void save(Archive& ar, SkString const & str) {
|
||||
ar(cereal::make_size_tag(static_cast<uint64_t>(str.size())));
|
||||
ar(cereal::binary_data(str.data(), str.size() * sizeof(char)));
|
||||
}
|
||||
|
||||
template <class Archive> void load(Archive& ar, SkString& str) {
|
||||
uint64_t size;
|
||||
ar(cereal::make_size_tag(size));
|
||||
str.resize(static_cast<size_t>(size));
|
||||
ar(cereal::binary_data(const_cast<char*>(str.data()), static_cast<size_t>(size) * sizeof(char)));
|
||||
}
|
||||
|
||||
namespace cereal
|
||||
{
|
||||
// https://stackoverflow.com/questions/22884216/serializing-eigenmatrix-using-cereal-library (with some modifications using constexpr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue