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

Method PropertiesJSON

src/effects/Sharpen.cpp:419–442  ·  view source on GitHub ↗

UI property definitions

Source from the content-addressed store, hash-verified

417
418// UI property definitions
419std::string Sharpen::PropertiesJSON(int64_t t) const
420{
421 Json::Value root = BasePropertiesJSON(t);
422 root["amount"] = add_property_json(
423 "Amount", amount.GetValue(t), "float", "", &amount, 0, 40, false, t);
424 root["radius"] = add_property_json(
425 "Radius", radius.GetValue(t), "float", "pixels", &radius, 0, 10, false, t);
426 root["threshold"] = add_property_json(
427 "Threshold", threshold.GetValue(t), "float", "ratio", &threshold, 0, 1, false, t);
428 root["mode"] = add_property_json(
429 "Mode", mode, "int", "", nullptr, 0, 1, false, t);
430 root["mode"]["choices"].append(add_property_choice_json("UnsharpMask", 0, mode));
431 root["mode"]["choices"].append(add_property_choice_json("HighPassBlend", 1, mode));
432 root["channel"] = add_property_json(
433 "Channel", channel, "int", "", nullptr, 0, 2, false, t);
434 root["channel"]["choices"].append(add_property_choice_json("All", 0, channel));
435 root["channel"]["choices"].append(add_property_choice_json("Luma", 1, channel));
436 root["channel"]["choices"].append(add_property_choice_json("Chroma", 2, channel));
437 root["mask_mode"] = add_property_json(
438 "Mask Mode", mask_mode, "int", "", nullptr, 0, 1, false, t);
439 root["mask_mode"]["choices"].append(add_property_choice_json("Limit to Mask", SHARPEN_MASK_LIMIT_TO_AREA, mask_mode));
440 root["mask_mode"]["choices"].append(add_property_choice_json("Vary Strength", SHARPEN_MASK_VARY_STRENGTH, mask_mode));
441 return root.toStyledString();
442}

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.80

Tested by

no test coverage detected