2025-11-10 14:45:51 +03:00
|
|
|
#pragma once
|
2025-11-10 16:49:02 +03:00
|
|
|
#include <modules/skparagraph/include/ParagraphStyle.h>
|
2025-11-10 14:45:51 +03:00
|
|
|
|
|
|
|
|
struct ParagraphStyleData {
|
2025-11-10 16:49:02 +03:00
|
|
|
skia::textlayout::TextAlign textAlignment = skia::textlayout::TextAlign::kLeft;
|
|
|
|
|
skia::textlayout::TextDirection textDirection = skia::textlayout::TextDirection::kLtr;
|
|
|
|
|
template <typename Archive> void save(Archive& a) const {
|
|
|
|
|
a(static_cast<uint8_t>(textAlignment), static_cast<uint8_t>(textDirection));
|
|
|
|
|
}
|
|
|
|
|
template <typename Archive> void load(Archive& a) {
|
|
|
|
|
uint8_t alignRead, directionRead;
|
|
|
|
|
a(alignRead, directionRead);
|
|
|
|
|
textAlignment = static_cast<skia::textlayout::TextAlign>(alignRead);
|
|
|
|
|
textDirection = static_cast<skia::textlayout::TextDirection>(directionRead);
|
|
|
|
|
}
|
|
|
|
|
skia::textlayout::ParagraphStyle get_paragraph_style() const;
|
2025-11-10 14:45:51 +03:00
|
|
|
};
|
|
|
|
|
|