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

Method PropertiesJSON

src/effects/Outline.cpp:169–184  ·  view source on GitHub ↗

Get all properties for a specific frame

Source from the content-addressed store, hash-verified

167
168// Get all properties for a specific frame
169std::string Outline::PropertiesJSON(int64_t requested_frame) const {
170
171 // Generate JSON properties list
172 Json::Value root = BasePropertiesJSON(requested_frame);
173
174 // Keyframes
175 root["width"] = add_property_json("Width", width.GetValue(requested_frame), "float", "", &width, 0, 100, false, requested_frame);
176 root["color"] = add_property_json("Key Color", 0.0, "color", "", &color.red, 0, 255, false, requested_frame);
177 root["color"]["red"] = add_property_json("Red", color.red.GetValue(requested_frame), "float", "", &color.red, 0, 255, false, requested_frame);
178 root["color"]["blue"] = add_property_json("Blue", color.blue.GetValue(requested_frame), "float", "", &color.blue, 0, 255, false, requested_frame);
179 root["color"]["green"] = add_property_json("Green", color.green.GetValue(requested_frame), "float", "", &color.green, 0, 255, false, requested_frame);
180 root["color"]["alpha"] = add_property_json("Alpha", color.alpha.GetValue(requested_frame), "float", "", &color.alpha, 0, 255, false, requested_frame);
181
182 // Return formatted string
183 return root.toStyledString();
184}

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.80

Tested by

no test coverage detected