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

Method PropertiesJSON

src/effects/Crop.cpp:184–204  ·  view source on GitHub ↗

Get all properties for a specific frame

Source from the content-addressed store, hash-verified

182
183// Get all properties for a specific frame
184std::string Crop::PropertiesJSON(int64_t requested_frame) const {
185
186 // Generate JSON properties list
187 Json::Value root = BasePropertiesJSON(requested_frame);
188
189 // Keyframes
190 root["left"] = add_property_json("Left Size", left.GetValue(requested_frame), "float", "", &left, 0.0, 1.0, false, requested_frame);
191 root["top"] = add_property_json("Top Size", top.GetValue(requested_frame), "float", "", &top, 0.0, 1.0, false, requested_frame);
192 root["right"] = add_property_json("Right Size", right.GetValue(requested_frame), "float", "", &right, 0.0, 1.0, false, requested_frame);
193 root["bottom"] = add_property_json("Bottom Size", bottom.GetValue(requested_frame), "float", "", &bottom, 0.0, 1.0, false, requested_frame);
194 root["x"] = add_property_json("X Offset", x.GetValue(requested_frame), "float", "", &x, -1.0, 1.0, false, requested_frame);
195 root["y"] = add_property_json("Y Offset", y.GetValue(requested_frame), "float", "", &y, -1.0, 1.0, false, requested_frame);
196
197 // Add replace_image choices (dropdown style)
198 root["resize"] = add_property_json("Resize Image", resize, "int", "", NULL, 0, 1, false, requested_frame);
199 root["resize"]["choices"].append(add_property_choice_json("Yes", true, resize));
200 root["resize"]["choices"].append(add_property_choice_json("No", false, resize));
201
202 // Return formatted string
203 return root.toStyledString();
204}

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.80

Tested by

no test coverage detected