OpenShot Library | libopenshot 1.1.1
Loading...
Searching...
No Matches
Glow.h
Go to the documentation of this file.
1
9// Copyright (c) 2008-2026 OpenShot Studios, LLC
10//
11// SPDX-License-Identifier: LGPL-3.0-or-later
12
13#ifndef OPENSHOT_GLOW_EFFECT_H
14#define OPENSHOT_GLOW_EFFECT_H
15
16#include "../Color.h"
17#include "../EffectBase.h"
18#include "../Frame.h"
19#include "../Json.h"
20#include "../KeyFrame.h"
21
22#include <memory>
23#include <string>
24
25namespace openshot
26{
31
32 class Glow : public EffectBase
33 {
34 private:
35 void init_effect_details();
36
37 public:
38 int mode;
43
44 Glow();
45 Glow(Keyframe new_opacity, Keyframe new_blur_radius, Keyframe new_spread, Color new_color);
46
47 std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override {
48 return GetFrame(std::make_shared<openshot::Frame>(), frame_number);
49 }
50
51 std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame,
52 int64_t frame_number) override;
53
54 std::string Json() const override;
55 void SetJson(const std::string value) override;
56 Json::Value JsonValue() const override;
57 void SetJsonValue(const Json::Value root) override;
58
59 std::string PropertiesJSON(int64_t requested_frame) const override;
60 };
61}
62
63#endif
This class represents a color (used on the timeline and clips)
Definition Color.h:27
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:57
std::string Json() const override
Generate JSON string of this object.
Definition Glow.cpp:276
Keyframe blur_radius
Blur radius in pixels.
Definition Glow.h:40
std::string PropertiesJSON(int64_t requested_frame) const override
Definition Glow.cpp:315
void SetJson(const std::string value) override
Load JSON string into this object.
Definition Glow.cpp:291
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...
Definition Glow.h:47
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition Glow.cpp:301
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition Glow.cpp:280
Keyframe opacity
Overall glow opacity.
Definition Glow.h:39
Color color
Glow tint color.
Definition Glow.h:42
Keyframe spread
Boosts the source alpha before blur.
Definition Glow.h:41
int mode
Outer or inner glow mode.
Definition Glow.h:38
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition KeyFrame.h:53
This namespace is the default namespace for all code in the openshot library.
GlowMode
Definition Glow.h:27
@ GLOW_MODE_INNER
Definition Glow.h:29
@ GLOW_MODE_OUTER
Definition Glow.h:28