You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
std:: prefixes for TextReader.h/.cpp
This commit is contained in:
@@ -43,7 +43,7 @@ TextReader::TextReader() : width(1024), height(768), x_offset(0), y_offset(0), t
|
||||
Close();
|
||||
}
|
||||
|
||||
TextReader::TextReader(int width, int height, int x_offset, int y_offset, GravityType gravity, string text, string font, double size, string text_color, string background_color)
|
||||
TextReader::TextReader(int width, int height, int x_offset, int y_offset, GravityType gravity, std::string text, std::string font, double size, std::string text_color, std::string background_color)
|
||||
: width(width), height(height), x_offset(x_offset), y_offset(y_offset), text(text), font(font), size(size), text_color(text_color), background_color(background_color), is_open(false), gravity(gravity)
|
||||
{
|
||||
// Open and Close the reader, to populate its attributes (such as height, width, etc...)
|
||||
@@ -51,7 +51,7 @@ TextReader::TextReader(int width, int height, int x_offset, int y_offset, Gravit
|
||||
Close();
|
||||
}
|
||||
|
||||
void TextReader::SetTextBackgroundColor(string color) {
|
||||
void TextReader::SetTextBackgroundColor(std::string color) {
|
||||
text_background_color = color;
|
||||
|
||||
// Open and Close the reader, to populate it's attributes (such as height, width, etc...) plus the text background color
|
||||
@@ -187,7 +187,7 @@ std::shared_ptr<Frame> TextReader::GetFrame(int64_t requested_frame)
|
||||
}
|
||||
|
||||
// Generate JSON string of this object
|
||||
string TextReader::Json() {
|
||||
std::string TextReader::Json() {
|
||||
|
||||
// Return formatted string
|
||||
return JsonValue().toStyledString();
|
||||
@@ -216,14 +216,14 @@ Json::Value TextReader::JsonValue() {
|
||||
}
|
||||
|
||||
// Load JSON string into this object
|
||||
void TextReader::SetJson(string value) {
|
||||
void TextReader::SetJson(std::string value) {
|
||||
|
||||
// Parse JSON string into JSON objects
|
||||
Json::Value root;
|
||||
Json::CharReaderBuilder rbuilder;
|
||||
Json::CharReader* reader(rbuilder.newCharReader());
|
||||
|
||||
string errors;
|
||||
std::string errors;
|
||||
bool success = reader->parse( value.c_str(),
|
||||
value.c_str() + value.size(), &root, &errors );
|
||||
delete reader;
|
||||
|
||||
Reference in New Issue
Block a user