MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / init_settings

Method init_settings

src/Clip.cpp:69–132  ·  view source on GitHub ↗

Init default settings for a clip

Source from the content-addressed store, hash-verified

67
68// Init default settings for a clip
69void Clip::init_settings()
70{
71 // Init clip settings
72 Position(0.0);
73 Layer(0);
74 Start(0.0);
75 ClipBase::End(0.0);
76 gravity = GRAVITY_CENTER;
77 scale = SCALE_FIT;
78 anchor = ANCHOR_CANVAS;
79 display = FRAME_DISPLAY_NONE;
80 mixing = VOLUME_MIX_NONE;
81 composite = COMPOSITE_SOURCE_OVER;
82 waveform = false;
83 previous_properties = "";
84 parentObjectId = "";
85
86 // Init scale curves
87 scale_x = Keyframe(1.0);
88 scale_y = Keyframe(1.0);
89
90 // Init location curves
91 location_x = Keyframe(0.0);
92 location_y = Keyframe(0.0);
93
94 // Init alpha
95 alpha = Keyframe(1.0);
96
97 // Init time & volume
98 time = Keyframe(1.0);
99 volume = Keyframe(1.0);
100
101 // Init audio waveform color
102 wave_color = Color((unsigned char)0, (unsigned char)123, (unsigned char)255, (unsigned char)255);
103
104 // Init shear and perspective curves
105 shear_x = Keyframe(0.0);
106 shear_y = Keyframe(0.0);
107 origin_x = Keyframe(0.5);
108 origin_y = Keyframe(0.5);
109 perspective_c1_x = Keyframe(-1.0);
110 perspective_c1_y = Keyframe(-1.0);
111 perspective_c2_x = Keyframe(-1.0);
112 perspective_c2_y = Keyframe(-1.0);
113 perspective_c3_x = Keyframe(-1.0);
114 perspective_c3_y = Keyframe(-1.0);
115 perspective_c4_x = Keyframe(-1.0);
116 perspective_c4_y = Keyframe(-1.0);
117
118 // Init audio channel filter and mappings
119 channel_filter = Keyframe(-1.0);
120 channel_mapping = Keyframe(-1.0);
121
122 // Init audio and video overrides
123 has_audio = Keyframe(-1.0);
124 has_video = Keyframe(-1.0);
125
126 // Initialize the attached object and attached clip as null pointers

Callers

nothing calls this directly

Calls 2

KeyframeClass · 0.85
ColorClass · 0.85

Tested by

no test coverage detected