OpenShot Library | libopenshot  0.2.5
Enums.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Header file for TextReader class
4  * @author Jonathan Thomas <jonathan@openshot.org>
5  *
6  * @ref License
7  */
8 
9 /* LICENSE
10  *
11  * Copyright (c) 2008-2019 OpenShot Studios, LLC
12  * <http://www.openshotstudios.com/>. This file is part of
13  * OpenShot Library (libopenshot), an open-source project dedicated to
14  * delivering high quality video editing and animation solutions to the
15  * world. For more information visit <http://www.openshot.org/>.
16  *
17  * OpenShot Library (libopenshot) is free software: you can redistribute it
18  * and/or modify it under the terms of the GNU Lesser General Public License
19  * as published by the Free Software Foundation, either version 3 of the
20  * License, or (at your option) any later version.
21  *
22  * OpenShot Library (libopenshot) is distributed in the hope that it will be
23  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public License
28  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
29  */
30 
31 #ifndef OPENSHOT_ENUMS_H
32 #define OPENSHOT_ENUMS_H
33 
34 
35 namespace openshot
36 {
37  /// This enumeration determines how clips are aligned to their parent container.
39  {
40  GRAVITY_TOP_LEFT, ///< Align clip to the top left of its parent
41  GRAVITY_TOP, ///< Align clip to the top center of its parent
42  GRAVITY_TOP_RIGHT, ///< Align clip to the top right of its parent
43  GRAVITY_LEFT, ///< Align clip to the left of its parent (middle aligned)
44  GRAVITY_CENTER, ///< Align clip to the center of its parent (middle aligned)
45  GRAVITY_RIGHT, ///< Align clip to the right of its parent (middle aligned)
46  GRAVITY_BOTTOM_LEFT, ///< Align clip to the bottom left of its parent
47  GRAVITY_BOTTOM, ///< Align clip to the bottom center of its parent
48  GRAVITY_BOTTOM_RIGHT ///< Align clip to the bottom right of its parent
49  };
50 
51  /// This enumeration determines how clips are scaled to fit their parent container.
52  enum ScaleType
53  {
54  SCALE_CROP, ///< Scale the clip until both height and width fill the canvas (cropping the overlap)
55  SCALE_FIT, ///< Scale the clip until either height or width fills the canvas (with no cropping)
56  SCALE_STRETCH, ///< Scale the clip until both height and width fill the canvas (distort to fit)
57  SCALE_NONE ///< Do not scale the clip
58  };
59 
60  /// This enumeration determines what parent a clip should be aligned to.
62  {
63  ANCHOR_CANVAS, ///< Anchor the clip to the canvas
64  ANCHOR_VIEWPORT ///< Anchor the clip to the viewport (which can be moved / animated around the canvas)
65  };
66 
67  /// This enumeration determines the display format of the clip's frame number (if any). Useful for debugging.
69  {
70  FRAME_DISPLAY_NONE, ///< Do not display the frame number
71  FRAME_DISPLAY_CLIP, ///< Display the clip's internal frame number
72  FRAME_DISPLAY_TIMELINE, ///< Display the timeline's frame number
73  FRAME_DISPLAY_BOTH ///< Display both the clip's and timeline's frame number
74  };
75 
76  /// This enumeration determines the strategy when mixing audio with other clips.
78  {
79  VOLUME_MIX_NONE, ///< Do not apply any volume mixing adjustments. Just add the samples together.
80  VOLUME_MIX_AVERAGE, ///< Evenly divide the overlapping clips volume keyframes, so that the sum does not exceed 100%
81  VOLUME_MIX_REDUCE ///< Reduce volume by about %25, and then mix (louder, but could cause pops if the sum exceeds 100%)
82  };
83 }
84 #endif
This namespace is the default namespace for all code in the openshot library.
AnchorType
This enumeration determines what parent a clip should be aligned to.
Definition: Enums.h:62
@ ANCHOR_CANVAS
Anchor the clip to the canvas.
Definition: Enums.h:63
@ ANCHOR_VIEWPORT
Anchor the clip to the viewport (which can be moved / animated around the canvas)
Definition: Enums.h:64
GravityType
This enumeration determines how clips are aligned to their parent container.
Definition: Enums.h:39
@ GRAVITY_TOP_LEFT
Align clip to the top left of its parent.
Definition: Enums.h:40
@ GRAVITY_LEFT
Align clip to the left of its parent (middle aligned)
Definition: Enums.h:43
@ GRAVITY_TOP_RIGHT
Align clip to the top right of its parent.
Definition: Enums.h:42
@ GRAVITY_RIGHT
Align clip to the right of its parent (middle aligned)
Definition: Enums.h:45
@ GRAVITY_BOTTOM_LEFT
Align clip to the bottom left of its parent.
Definition: Enums.h:46
@ GRAVITY_BOTTOM
Align clip to the bottom center of its parent.
Definition: Enums.h:47
@ GRAVITY_TOP
Align clip to the top center of its parent.
Definition: Enums.h:41
@ GRAVITY_BOTTOM_RIGHT
Align clip to the bottom right of its parent.
Definition: Enums.h:48
@ GRAVITY_CENTER
Align clip to the center of its parent (middle aligned)
Definition: Enums.h:44
ScaleType
This enumeration determines how clips are scaled to fit their parent container.
Definition: Enums.h:53
@ SCALE_FIT
Scale the clip until either height or width fills the canvas (with no cropping)
Definition: Enums.h:55
@ SCALE_STRETCH
Scale the clip until both height and width fill the canvas (distort to fit)
Definition: Enums.h:56
@ SCALE_CROP
Scale the clip until both height and width fill the canvas (cropping the overlap)
Definition: Enums.h:54
@ SCALE_NONE
Do not scale the clip.
Definition: Enums.h:57
VolumeMixType
This enumeration determines the strategy when mixing audio with other clips.
Definition: Enums.h:78
@ VOLUME_MIX_AVERAGE
Evenly divide the overlapping clips volume keyframes, so that the sum does not exceed 100%.
Definition: Enums.h:80
@ VOLUME_MIX_NONE
Do not apply any volume mixing adjustments. Just add the samples together.
Definition: Enums.h:79
@ VOLUME_MIX_REDUCE
Reduce volume by about %25, and then mix (louder, but could cause pops if the sum exceeds 100%)
Definition: Enums.h:81
FrameDisplayType
This enumeration determines the display format of the clip's frame number (if any)....
Definition: Enums.h:69
@ FRAME_DISPLAY_CLIP
Display the clip's internal frame number.
Definition: Enums.h:71
@ FRAME_DISPLAY_TIMELINE
Display the timeline's frame number.
Definition: Enums.h:72
@ FRAME_DISPLAY_BOTH
Display both the clip's and timeline's frame number.
Definition: Enums.h:73
@ FRAME_DISPLAY_NONE
Do not display the frame number.
Definition: Enums.h:70