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;
156 #endif //USE_IMAGEMAGICK 157 #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.
Header file for CacheMemory class.
openshot::CacheMemory * GetCache() override
Get the cache object used by this reader (always returns NULL for this object)
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
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
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.
This class is a memory-based cache manager for Frame objects.
GravityType
This enumeration determines how clips are aligned to their parent container.
std::string Json() const override
Generate JSON string of this object.