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

Method JsonValue

src/effects/Caption.cpp:379–404  ·  view source on GitHub ↗

Generate Json::Value for this object

Source from the content-addressed store, hash-verified

377
378// Generate Json::Value for this object
379Json::Value Caption::JsonValue() const {
380
381 // Create root json object
382 Json::Value root = EffectBase::JsonValue(); // get parent properties
383 root["type"] = info.class_name;
384 root["color"] = color.JsonValue();
385 root["stroke"] = stroke.JsonValue();
386 root["background"] = background.JsonValue();
387 root["background_alpha"] = background_alpha.JsonValue();
388 root["background_corner"] = background_corner.JsonValue();
389 root["background_padding"] = background_padding.JsonValue();
390 root["stroke_width"] = stroke_width.JsonValue();
391 root["font_size"] = font_size.JsonValue();
392 root["font_alpha"] = font_alpha.JsonValue();
393 root["fade_in"] = fade_in.JsonValue();
394 root["fade_out"] = fade_out.JsonValue();
395 root["line_spacing"] = line_spacing.JsonValue();
396 root["left"] = left.JsonValue();
397 root["top"] = top.JsonValue();
398 root["right"] = right.JsonValue();
399 root["caption_text"] = caption_text;
400 root["caption_font"] = font_name;
401
402 // return JsonValue
403 return root;
404}
405
406// Load JSON string into this object
407void Caption::SetJson(const std::string value) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected