OpenShot Library | libopenshot  0.4.0
Negate.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2008-2019 OpenShot Studios, LLC
10 //
11 // SPDX-License-Identifier: LGPL-3.0-or-later
12 
13 #ifndef OPENSHOT_NEGATE_EFFECT_H
14 #define OPENSHOT_NEGATE_EFFECT_H
15 
16 #include "../EffectBase.h"
17 
18 #include "../Frame.h"
19 #include "../KeyFrame.h"
20 
21 #include <memory>
22 #include <string>
23 
24 #include <QImage>
25 
26 namespace openshot
27 {
28 
34  class Negate : public EffectBase
35  {
36  public:
37 
39  Negate();
40 
47  std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override { return GetFrame(std::make_shared<openshot::Frame>(), frame_number); }
48 
58  std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) override;
59 
60  // Get and Set JSON methods
61  std::string Json() const override;
62  void SetJson(const std::string value) override;
63  Json::Value JsonValue() const override;
64  void SetJsonValue(const Json::Value root) override;
65 
66  // Get all properties for a specific frame
67  std::string PropertiesJSON(int64_t requested_frame) const override;
68  };
69 
70 }
71 
72 #endif
openshot::Negate::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition: Negate.cpp:51
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition: EffectBase.h:53
openshot
This namespace is the default namespace for all code in the openshot library.
Definition: Compressor.h:28
openshot::Negate::Json
std::string Json() const override
Generate JSON string of this object.
Definition: Negate.cpp:44
openshot::Negate::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition: Negate.cpp:62
openshot::Negate::Negate
Negate()
Default constructor.
Definition: Negate.cpp:19
openshot::Negate
This class uses the ImageMagick++ libraries, to negate image (i.e. negative)
Definition: Negate.h:34
openshot::Negate::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition: Negate.cpp:79
openshot::Negate::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition: Negate.cpp:87
openshot::Negate::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: Negate.h:47