OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Shift.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_SHIFT_EFFECT_H
14
#define OPENSHOT_SHIFT_EFFECT_H
15
16
#include "
../EffectBase.h
"
17
18
#include "
../Frame.h
"
19
#include "
../Json.h
"
20
#include "
../KeyFrame.h
"
21
22
#include <string>
23
#include <memory>
24
25
26
namespace
openshot
27
{
28
36
class
Shift
:
public
EffectBase
37
{
38
private
:
40
void
init_effect_details();
41
42
43
public
:
44
Keyframe
x
;
45
Keyframe
y
;
46
48
Shift
();
49
54
Shift
(
Keyframe
x
,
Keyframe
y
);
55
62
std::shared_ptr<openshot::Frame>
GetFrame
(int64_t frame_number)
override
{
return
GetFrame
(std::make_shared<openshot::Frame>(), frame_number); }
63
73
std::shared_ptr<openshot::Frame>
GetFrame
(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override
;
74
75
// Get and Set JSON methods
76
std::string
Json
()
const override
;
77
void
SetJson
(
const
std::string value)
override
;
78
Json::Value
JsonValue
()
const override
;
79
void
SetJsonValue
(
const
Json::Value root)
override
;
80
83
std::string
PropertiesJSON
(int64_t requested_frame)
const override
;
84
};
85
86
}
87
88
#endif
EffectBase.h
Header file for EffectBase class.
Frame.h
Header file for Frame class.
Json.h
Header file for JSON class.
KeyFrame.h
Header file for the Keyframe class.
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::Shift::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
Shift.h:62
openshot::Shift::y
Keyframe y
Shift the Y coordinates (up or down).
Definition
Shift.h:45
openshot::Shift::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Shift.cpp:119
openshot::Shift::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Shift.cpp:126
openshot::Shift::x
Keyframe x
Shift the X coordinates (left or right).
Definition
Shift.h:44
openshot::Shift::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Shift.cpp:156
openshot::Shift::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Shift.cpp:169
openshot::Shift::Shift
Shift()
Blank constructor, useful when using Json to load the effect properties.
Definition
Shift.cpp:19
openshot::Shift::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Shift.cpp:139
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
effects
Shift.h
Generated by
1.17.0