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

Method SetJsonValue

src/Color.cpp:117–128  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

115
116// Load Json::Value into this object
117void Color::SetJsonValue(const Json::Value root) {
118
119 // Set data from Json (if key is found)
120 if (!root["red"].isNull())
121 red.SetJsonValue(root["red"]);
122 if (!root["green"].isNull())
123 green.SetJsonValue(root["green"]);
124 if (!root["blue"].isNull())
125 blue.SetJsonValue(root["blue"]);
126 if (!root["alpha"].isNull())
127 alpha.SetJsonValue(root["alpha"]);
128}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected