OpenShot Library | libopenshot 0.3.3
Loading...
Searching...
No Matches
ColorShift.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_COLOR_SHIFT_EFFECT_H
14#define OPENSHOT_COLOR_SHIFT_EFFECT_H
15
16#include "../EffectBase.h"
17
18#include <cmath>
19#include <stdio.h>
20#include <memory>
21#include "../Json.h"
22#include "../KeyFrame.h"
23
24
25namespace openshot
26{
27
35 class ColorShift : public EffectBase
36 {
37 private:
39 void init_effect_details();
40
41 public:
50
52 ColorShift();
53
65
72 std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override { return GetFrame(std::make_shared<openshot::Frame>(), frame_number); }
73
83 std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) override;
84
85 // Get and Set JSON methods
86 std::string Json() const override;
87 void SetJson(const std::string value) override;
88 Json::Value JsonValue() const override;
89 void SetJsonValue(const Json::Value root) override;
90
93 std::string PropertiesJSON(int64_t requested_frame) const override;
94 };
95
96}
97
98#endif
Header file for EffectBase class.
Header file for JSON class.
Header file for the Keyframe class.
This class shifts the pixels of an image up, down, left, or right, and can be animated with openshot:...
Definition ColorShift.h:36
Keyframe blue_x
Shift the Blue X coordinates (left or right)
Definition ColorShift.h:46
std::string Json() const override
Generate JSON string of this object.
Keyframe red_y
Shift the Red Y coordinates (up or down)
Definition ColorShift.h:43
Keyframe alpha_y
Shift the Alpha Y coordinates (up or down)
Definition ColorShift.h:49
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 ColorShift.h:72
void SetJson(const std::string value) override
Load JSON string into this object.
std::string PropertiesJSON(int64_t requested_frame) const override
Keyframe green_y
Shift the Green Y coordinates (up or down)
Definition ColorShift.h:45
Keyframe alpha_x
Shift the Alpha X coordinates (left or right)
Definition ColorShift.h:48
Json::Value JsonValue() const override
Generate Json::Value for this object.
Keyframe red_x
Shift the Red X coordinates (left or right)
Definition ColorShift.h:42
Keyframe green_x
Shift the Green X coordinates (left or right)
Definition ColorShift.h:44
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Keyframe blue_y
Shift the Blue Y coordinates (up or down)
Definition ColorShift.h:47
ColorShift()
Blank constructor, useful when using Json to load the effect properties.
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:54
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.
Definition Compressor.h:29