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

Method SetJsonValue

src/effects/Crop.cpp:161–181  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

159
160// Load Json::Value into this object
161void Crop::SetJsonValue(const Json::Value root) {
162
163 // Set parent data
164 EffectBase::SetJsonValue(root);
165
166 // Set data from Json (if key is found)
167 if (!root["left"].isNull())
168 left.SetJsonValue(root["left"]);
169 if (!root["top"].isNull())
170 top.SetJsonValue(root["top"]);
171 if (!root["right"].isNull())
172 right.SetJsonValue(root["right"]);
173 if (!root["bottom"].isNull())
174 bottom.SetJsonValue(root["bottom"]);
175 if (!root["x"].isNull())
176 x.SetJsonValue(root["x"]);
177 if (!root["y"].isNull())
178 y.SetJsonValue(root["y"]);
179 if (!root["resize"].isNull())
180 resize = root["resize"].asBool();
181}
182
183// Get all properties for a specific frame
184std::string Crop::PropertiesJSON(int64_t requested_frame) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected