Place ParagraphStyleData in RichText namespace
This commit is contained in:
parent
557df9bd50
commit
700238ffee
3 changed files with 8 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ class TextBoxEditTool : public DrawingProgramEditToolBase {
|
|||
bool newIsLinethrough = false;
|
||||
bool newIsOverline = false;
|
||||
std::string newFontName;
|
||||
ParagraphStyleData currentPStyle;
|
||||
RichText::ParagraphStyleData currentPStyle;
|
||||
|
||||
uint8_t get_new_decoration_value();
|
||||
void set_styles_at_selection(const std::shared_ptr<DrawTextBox>& a);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
#include "ParagraphStyleData.hpp"
|
||||
|
||||
namespace RichText {
|
||||
|
||||
skia::textlayout::ParagraphStyle ParagraphStyleData::get_paragraph_style() const {
|
||||
skia::textlayout::ParagraphStyle pStyle;
|
||||
pStyle.setTextAlign(textAlignment);
|
||||
pStyle.setTextDirection(textDirection);
|
||||
return pStyle;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
#include <modules/skparagraph/include/ParagraphStyle.h>
|
||||
|
||||
namespace RichText {
|
||||
|
||||
struct ParagraphStyleData {
|
||||
skia::textlayout::TextAlign textAlignment = skia::textlayout::TextAlign::kLeft;
|
||||
skia::textlayout::TextDirection textDirection = skia::textlayout::TextDirection::kLtr;
|
||||
|
|
@ -16,3 +18,4 @@ struct ParagraphStyleData {
|
|||
skia::textlayout::ParagraphStyle get_paragraph_style() const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue