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 newIsLinethrough = false;
|
||||||
bool newIsOverline = false;
|
bool newIsOverline = false;
|
||||||
std::string newFontName;
|
std::string newFontName;
|
||||||
ParagraphStyleData currentPStyle;
|
RichText::ParagraphStyleData currentPStyle;
|
||||||
|
|
||||||
uint8_t get_new_decoration_value();
|
uint8_t get_new_decoration_value();
|
||||||
void set_styles_at_selection(const std::shared_ptr<DrawTextBox>& a);
|
void set_styles_at_selection(const std::shared_ptr<DrawTextBox>& a);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
#include "ParagraphStyleData.hpp"
|
#include "ParagraphStyleData.hpp"
|
||||||
|
|
||||||
|
namespace RichText {
|
||||||
|
|
||||||
skia::textlayout::ParagraphStyle ParagraphStyleData::get_paragraph_style() const {
|
skia::textlayout::ParagraphStyle ParagraphStyleData::get_paragraph_style() const {
|
||||||
skia::textlayout::ParagraphStyle pStyle;
|
skia::textlayout::ParagraphStyle pStyle;
|
||||||
pStyle.setTextAlign(textAlignment);
|
pStyle.setTextAlign(textAlignment);
|
||||||
pStyle.setTextDirection(textDirection);
|
pStyle.setTextDirection(textDirection);
|
||||||
return pStyle;
|
return pStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <modules/skparagraph/include/ParagraphStyle.h>
|
#include <modules/skparagraph/include/ParagraphStyle.h>
|
||||||
|
|
||||||
|
namespace RichText {
|
||||||
|
|
||||||
struct ParagraphStyleData {
|
struct ParagraphStyleData {
|
||||||
skia::textlayout::TextAlign textAlignment = skia::textlayout::TextAlign::kLeft;
|
skia::textlayout::TextAlign textAlignment = skia::textlayout::TextAlign::kLeft;
|
||||||
skia::textlayout::TextDirection textDirection = skia::textlayout::TextDirection::kLtr;
|
skia::textlayout::TextDirection textDirection = skia::textlayout::TextDirection::kLtr;
|
||||||
|
|
@ -16,3 +18,4 @@ struct ParagraphStyleData {
|
||||||
skia::textlayout::ParagraphStyle get_paragraph_style() const;
|
skia::textlayout::ParagraphStyle get_paragraph_style() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue