31 #ifndef OPENSHOT_TEXT_READER_H
32 #define OPENSHOT_TEXT_READER_H
35 #ifdef USE_IMAGEMAGICK
95 std::string text_color;
96 std::string background_color;
97 std::string text_background_color;
98 std::shared_ptr<Magick::Image> image;
119 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);
126 void Close()
override;
136 std::shared_ptr<openshot::Frame>
GetFrame(int64_t requested_frame)
override;
139 bool IsOpen()
override {
return is_open; };
142 std::string
Name()
override {
return "TextReader"; };
145 std::string
Json()
const override;
146 void SetJson(
const std::string value)
override;
151 void Open()
override;
Header file for CacheMemory class.
Header file for TextReader class.
Header file for MagickUtilities (IM6/IM7 compatibility overlay)
Header file for ReaderBase class.
This class is a memory-based cache manager for Frame objects.
This abstract class is the base class, used by all readers in libopenshot.
This class uses the ImageMagick++ libraries, to create frames with "Text", and return openshot::Frame...
void Close() override
Close Reader.
std::string Json() const override
Generate JSON string of this object.
openshot::CacheMemory * GetCache() override
Get the cache object used by this reader (always returns NULL for this object)
std::string Name() override
Return the type name of the class.
TextReader()
Default constructor (blank text)
void Open() override
Open Reader - which is called by the constructor automatically.
void SetTextBackgroundColor(std::string color)
void SetJson(const std::string value) override
Load JSON string into this object.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
bool IsOpen() override
Determine if reader is open or closed.
Json::Value JsonValue() const override
Generate Json::Value for this object.
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame) override
This namespace is the default namespace for all code in the openshot library.
GravityType
This enumeration determines how clips are aligned to their parent container.