OpenShot Library | libopenshot  0.4.0
LensFlare.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2008-2025 OpenShot Studios, LLC
10 //
11 // SPDX-License-Identifier: LGPL-3.0-or-later
12 
13 #ifndef OPENSHOT_LENSFLARE_EFFECT_H
14 #define OPENSHOT_LENSFLARE_EFFECT_H
15 
16 #include "../EffectBase.h"
17 #include "../KeyFrame.h"
18 #include "../Color.h"
19 #include <QImage>
20 #include <QColor>
21 
22 namespace openshot
23 {
24  class LensFlare : public EffectBase
25  {
26  private:
27  void init_effect_details();
28 
29  public:
36 
37  LensFlare();
38  ~LensFlare() override;
39  LensFlare(const Keyframe &xPos,
40  const Keyframe &yPos,
41  const Keyframe &intensity,
42  const Keyframe &scale,
43  const Keyframe &spreadVal,
44  const Keyframe &bladeCount,
45  const Keyframe &shapeType,
46  const Color &tint = Color("#ffffff"));
47 
48  std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override;
49  std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame,
50  int64_t frame_number) override;
51 
52  std::string Json() const override;
53  Json::Value JsonValue() const override;
54  void SetJson(const std::string value) override;
55  void SetJsonValue(const Json::Value root) override;
56 
57  std::string PropertiesJSON(int64_t requested_frame) const override;
58  };
59 
60 } // namespace openshot
61 
62 #endif // OPENSHOT_LENSFLARE_EFFECT_H
openshot::LensFlare::GetFrame
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: LensFlare.cpp:361
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition: EffectBase.h:53
openshot::LensFlare::y
Keyframe y
Definition: LensFlare.h:31
openshot
This namespace is the default namespace for all code in the openshot library.
Definition: Compressor.h:28
openshot::LensFlare
Definition: LensFlare.h:24
openshot::LensFlare::size
Keyframe size
Definition: LensFlare.h:33
openshot::LensFlare::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition: LensFlare.cpp:406
openshot::LensFlare::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition: LensFlare.cpp:394
openshot::LensFlare::LensFlare
LensFlare()
Definition: LensFlare.cpp:47
openshot::Color
This class represents a color (used on the timeline and clips)
Definition: Color.h:27
openshot::LensFlare::x
Keyframe x
Definition: LensFlare.h:30
openshot::Keyframe
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition: KeyFrame.h:53
openshot::LensFlare::Json
std::string Json() const override
Generate JSON string of this object.
Definition: LensFlare.cpp:367
openshot::LensFlare::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition: LensFlare.cpp:387
openshot::LensFlare::spread
Keyframe spread
Definition: LensFlare.h:34
openshot::LensFlare::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition: LensFlare.cpp:373
openshot::LensFlare::~LensFlare
~LensFlare() override
openshot::LensFlare::brightness
Keyframe brightness
Definition: LensFlare.h:32
openshot::LensFlare::color
Color color
Definition: LensFlare.h:35