OpenShot Library | libopenshot
0.3.3
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_CAPTION_EFFECT_H
14 #define OPENSHOT_CAPTION_EFFECT_H
20 #include <QFontMetrics>
21 #include <QRegularExpression>
23 #include "../EffectBase.h"
25 #include "../KeyFrame.h"
41 std::vector<QRegularExpressionMatch> matchedCaptions;
42 std::string caption_text;
43 QFontMetrics* metrics;
48 void init_effect_details();
86 std::shared_ptr<openshot::Frame>
GetFrame(int64_t frame_number)
override {
return GetFrame(std::make_shared<openshot::Frame>(), frame_number); }
97 std::shared_ptr<openshot::Frame>
GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override;
104 std::string
Json()
const override;
105 void SetJson(
const std::string value)
override;
111 std::string
PropertiesJSON(int64_t requested_frame)
const override;
116 #endif // OPENSHOT_CAPTION_EFFECT_H
This abstract class is the base class, used by all effects in libopenshot.
Keyframe stroke_width
Width of text border / stroke.
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
Json::Value JsonValue() const override
Generate Json::Value for this object.
This namespace is the default namespace for all code in the openshot library.
Keyframe fade_in
Fade in per caption (# of seconds)
Color stroke
Color of text border / stroke.
Caption()
Blank constructor, useful when using Json to load the effect properties.
Keyframe background_corner
Background cornder radius.
Keyframe left
Size of left bar.
Keyframe top
Size of top bar.
std::string font_name
Font string.
This class adds captions/text over a video, based on timestamps. You can also animate some limited as...
This class represents a color (used on the timeline and clips)
void SetJson(const std::string value) override
Load JSON string into this object.
Keyframe background_padding
Background padding.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Keyframe right
Size of right bar.
Keyframe fade_out
Fade in per caption (# of seconds)
Color color
Color of caption text.
Color background
Color of caption area background.
std::string PropertiesJSON(int64_t requested_frame) const override
std::string Json() const override
Generate JSON string of this object.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Keyframe font_size
Font size in points.
Keyframe line_spacing
Distance between lines (1.0 default / 100%)
Keyframe background_alpha
Background color alpha.
Keyframe font_alpha
Font color alpha.
std::string CaptionText()
Set the caption string to use (see VTT format)