OpenShot Library | libopenshot  0.1.9
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  * @section LICENSE
7  *
8  * Copyright (c) 2008-2014 OpenShot Studios, LLC
9  * <http://www.openshotstudios.com/>. This file is part of
10  * OpenShot Library (libopenshot), an open-source project dedicated to
11  * delivering high quality video editing and animation solutions to the
12  * world. For more information visit <http://www.openshot.org/>.
13  *
14  * OpenShot Library (libopenshot) is free software: you can redistribute it
15  * and/or modify it under the terms of the GNU Lesser General Public License
16  * as published by the Free Software Foundation, either version 3 of the
17  * License, or (at your option) any later version.
18  *
19  * OpenShot Library (libopenshot) is distributed in the hope that it will be
20  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
26  */
27 
28 #ifndef OPENSHOT_ENUMS_H
29 #define OPENSHOT_ENUMS_H
30 
31 
32 namespace openshot
33 {
34  /// This enumeration determines how clips are aligned to their parent container.
36  {
37  GRAVITY_TOP_LEFT, ///< Align clip to the top left of its parent
38  GRAVITY_TOP, ///< Align clip to the top center of its parent
39  GRAVITY_TOP_RIGHT, ///< Align clip to the top right of its parent
40  GRAVITY_LEFT, ///< Align clip to the left of its parent (middle aligned)
41  GRAVITY_CENTER, ///< Align clip to the center of its parent (middle aligned)
42  GRAVITY_RIGHT, ///< Align clip to the right of its parent (middle aligned)
43  GRAVITY_BOTTOM_LEFT, ///< Align clip to the bottom left of its parent
44  GRAVITY_BOTTOM, ///< Align clip to the bottom center of its parent
45  GRAVITY_BOTTOM_RIGHT ///< Align clip to the bottom right of its parent
46  };
47 
48  /// This enumeration determines how clips are scaled to fit their parent container.
49  enum ScaleType
50  {
51  SCALE_CROP, ///< Scale the clip until both height and width fill the canvas (cropping the overlap)
52  SCALE_FIT, ///< Scale the clip until either height or width fills the canvas (with no cropping)
53  SCALE_STRETCH, ///< Scale the clip until both height and width fill the canvas (distort to fit)
54  SCALE_NONE ///< Do not scale the clip
55  };
56 
57  /// This enumeration determines what parent a clip should be aligned to.
59  {
60  ANCHOR_CANVAS, ///< Anchor the clip to the canvas
61  ANCHOR_VIEWPORT ///< Anchor the clip to the viewport (which can be moved / animated around the canvas)
62  };
63 
64  /// This enumeration determines the display format of the clip's frame number (if any). Useful for debugging.
66  {
67  FRAME_DISPLAY_NONE, ///< Do not display the frame number
68  FRAME_DISPLAY_CLIP, ///< Display the clip's internal frame number
69  FRAME_DISPLAY_TIMELINE, ///< Display the timeline's frame number
70  FRAME_DISPLAY_BOTH ///< Display both the clip's and timeline's frame number
71  };
72 }
73 #endif
Display the timeline&#39;s frame number.
Definition: Enums.h:69
Align clip to the right of its parent (middle aligned)
Definition: Enums.h:42
Align clip to the bottom right of its parent.
Definition: Enums.h:45
Do not scale the clip.
Definition: Enums.h:54
Scale the clip until both height and width fill the canvas (cropping the overlap) ...
Definition: Enums.h:51
ScaleType
This enumeration determines how clips are scaled to fit their parent container.
Definition: Enums.h:49
Do not display the frame number.
Definition: Enums.h:67
Align clip to the top right of its parent.
Definition: Enums.h:39
Align clip to the bottom left of its parent.
Definition: Enums.h:43
Align clip to the bottom center of its parent.
Definition: Enums.h:44
Align clip to the top left of its parent.
Definition: Enums.h:37
FrameDisplayType
This enumeration determines the display format of the clip&#39;s frame number (if any). Useful for debugging.
Definition: Enums.h:65
Align clip to the left of its parent (middle aligned)
Definition: Enums.h:40
Scale the clip until both height and width fill the canvas (distort to fit)
Definition: Enums.h:53
Display the clip&#39;s internal frame number.
Definition: Enums.h:68
Anchor the clip to the viewport (which can be moved / animated around the canvas) ...
Definition: Enums.h:61
AnchorType
This enumeration determines what parent a clip should be aligned to.
Definition: Enums.h:58
Align clip to the center of its parent (middle aligned)
Definition: Enums.h:41
Display both the clip&#39;s and timeline&#39;s frame number.
Definition: Enums.h:70
This namespace is the default namespace for all code in the openshot library.
Align clip to the top center of its parent.
Definition: Enums.h:38
Scale the clip until either height or width fills the canvas (with no cropping)
Definition: Enums.h:52
GravityType
This enumeration determines how clips are aligned to their parent container.
Definition: Enums.h:35
Anchor the clip to the canvas.
Definition: Enums.h:60