MCPcopy Create free account
hub / github.com/antvis/F2Native / GetNumber

Function GetNumber

core/graphics/util/json.cpp:65–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65const double GetNumber(const nlohmann::json &obj, const std::string &key, const double def) {
66 if(obj.is_object() && obj.contains(key) && obj[key].is_number()) {
67 return obj[key].get<double>();
68 } else {
69 return def;
70 }
71}
72
73const int GetIntNumber(const nlohmann::json &obj, const std::string &key, const int def) {
74 if(obj.is_object() && obj.contains(key) && obj[key].is_number_integer()) {

Callers 15

CompatScaleMethod · 0.85
ParseObjectMethod · 0.85
ChangeMethod · 0.85
InitConfigMethod · 0.85
InitConfigMethod · 0.85
OnBeforeCanvasDrawMethod · 0.85
SetXTipContentMethod · 0.85
SetYTipContentMethod · 0.85
_ShowSnapMethod · 0.85
ShowToolTipsMethod · 0.85
ShowToolTipMethod · 0.85
CreateShapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected