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

Method JsonValue

src/TrackedObjectBBox.cpp:307–335  ·  view source on GitHub ↗

Generate Json::Value for this object

Source from the content-addressed store, hash-verified

305
306// Generate Json::Value for this object
307Json::Value TrackedObjectBBox::JsonValue() const
308{
309 // Create root json object
310 Json::Value root;
311
312 // Object's properties
313 root["box_id"] = Id();
314 root["BaseFPS"]["num"] = BaseFps.num;
315 root["BaseFPS"]["den"] = BaseFps.den;
316 root["TimeScale"] = TimeScale;
317
318 // Keyframe's properties
319 root["delta_x"] = delta_x.JsonValue();
320 root["delta_y"] = delta_y.JsonValue();
321 root["scale_x"] = scale_x.JsonValue();
322 root["scale_y"] = scale_y.JsonValue();
323 root["rotation"] = rotation.JsonValue();
324 root["visible"] = visible.JsonValue();
325 root["draw_box"] = draw_box.JsonValue();
326 root["stroke"] = stroke.JsonValue();
327 root["background_alpha"] = background_alpha.JsonValue();
328 root["background_corner"] = background_corner.JsonValue();
329 root["background"] = background.JsonValue();
330 root["stroke_width"] = stroke_width.JsonValue();
331 root["stroke_alpha"] = stroke_alpha.JsonValue();
332
333 // return JsonValue
334 return root;
335}
336
337// Load JSON string into this object
338void TrackedObjectBBox::SetJson(const std::string value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected