13 #ifndef OPENSHOT_TEXT_READER_H 14 #define OPENSHOT_TEXT_READER_H 17 #ifdef USE_IMAGEMAGICK 72 std::string text_color;
73 std::string background_color;
74 std::string text_background_color;
75 std::shared_ptr<Magick::Image> image;
96 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);
103 void Close()
override;
113 std::shared_ptr<openshot::Frame>
GetFrame(int64_t requested_frame)
override;
116 bool IsOpen()
override {
return is_open; };
119 std::string
Name()
override {
return "TextReader"; };
122 std::string
Json()
const override;
123 void SetJson(
const std::string value)
override;
128 void Open()
override;
133 #endif //USE_IMAGEMAGICK 134 #endif //OPENSHOT_TEXT_READER_H Header file for ReaderBase class.
Header file for MagickUtilities (IM6/IM7 compatibility overlay)
std::string Name() override
Return the type name of the class.
bool IsOpen() override
Determine if reader is open or closed.
This abstract class is the base class, used by all readers in libopenshot.
void SetTextBackgroundColor(std::string color)
void Open() override
Open Reader - which is called by the constructor automatically.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
All cache managers in libopenshot are based on this CacheBase class.
TextReader()
Default constructor (blank text)
void Close() override
Close Reader.
Header file for TextReader class.
This namespace is the default namespace for all code in the openshot library.
Json::Value JsonValue() const override
Generate Json::Value for this object.
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame) override
openshot::CacheBase * GetCache() override
Get the cache object used by this reader (always returns NULL for this object)
This class uses the ImageMagick++ libraries, to create frames with "Text", and return openshot::Frame...
void SetJson(const std::string value) override
Load JSON string into this object.
GravityType
This enumeration determines how clips are aligned to their parent container.
std::string Json() const override
Generate JSON string of this object.