OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
ColorShift.h
Go to the documentation of this file.
1
8
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
25
namespace
openshot
26
{
27
35
class
ColorShift
:
public
EffectBase
36
{
37
private
:
39
void
init_effect_details();
40
41
public
:
42
Keyframe
red_x
;
43
Keyframe
red_y
;
44
Keyframe
green_x
;
45
Keyframe
green_y
;
46
Keyframe
blue_x
;
47
Keyframe
blue_y
;
48
Keyframe
alpha_x
;
49
Keyframe
alpha_y
;
50
52
ColorShift
();
53
64
ColorShift
(
Keyframe
red_x
,
Keyframe
red_y
,
Keyframe
green_x
,
Keyframe
green_y
,
Keyframe
blue_x
,
Keyframe
blue_y
,
Keyframe
alpha_x
,
Keyframe
alpha_y
);
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
EffectBase.h
Header file for EffectBase class.
Json.h
Header file for JSON class.
KeyFrame.h
Header file for the Keyframe class.
openshot::ColorShift::blue_x
Keyframe blue_x
Shift the Blue X coordinates (left or right).
Definition
ColorShift.h:46
openshot::ColorShift::Json
std::string Json() const override
Generate JSON string of this object.
Definition
ColorShift.cpp:178
openshot::ColorShift::red_y
Keyframe red_y
Shift the Red Y coordinates (up or down).
Definition
ColorShift.h:43
openshot::ColorShift::alpha_y
Keyframe alpha_y
Shift the Alpha Y coordinates (up or down).
Definition
ColorShift.h:49
openshot::ColorShift::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
ColorShift.h:72
openshot::ColorShift::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
ColorShift.cpp:204
openshot::ColorShift::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
ColorShift.cpp:246
openshot::ColorShift::green_y
Keyframe green_y
Shift the Green Y coordinates (up or down).
Definition
ColorShift.h:45
openshot::ColorShift::alpha_x
Keyframe alpha_x
Shift the Alpha X coordinates (left or right).
Definition
ColorShift.h:48
openshot::ColorShift::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
ColorShift.cpp:185
openshot::ColorShift::red_x
Keyframe red_x
Shift the Red X coordinates (left or right).
Definition
ColorShift.h:42
openshot::ColorShift::green_x
Keyframe green_x
Shift the Green X coordinates (left or right).
Definition
ColorShift.h:44
openshot::ColorShift::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
ColorShift.cpp:221
openshot::ColorShift::blue_y
Keyframe blue_y
Shift the Blue Y coordinates (up or down).
Definition
ColorShift.h:47
openshot::ColorShift::ColorShift
ColorShift()
Blank constructor, useful when using Json to load the effect properties.
Definition
ColorShift.cpp:19
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition
EffectBase.h:57
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
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
effects
ColorShift.h
Generated by
1.17.0