MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / to_json

Function to_json

include/Helpers/Serializers.cpp:3–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "Serializers.hpp"
2
3void to_json(nlohmann::json& j, const SkColor4f& d) {
4 j = nlohmann::json::array();
5 j.emplace_back(d.fR);
6 j.emplace_back(d.fG);
7 j.emplace_back(d.fB);
8 j.emplace_back(d.fA);
9}
10
11void from_json(const nlohmann::json& j, SkColor4f& d) {
12 j.at(0).template get_to<float>(d.fR);

Callers

nothing calls this directly

Calls 1

arrayClass · 0.50

Tested by

no test coverage detected