MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / gradient_create_keys

Function gradient_create_keys

StereoKitC/color.cpp:136–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134///////////////////////////////////////////
135
136gradient_t gradient_create_keys(const gradient_key_t *keys, int32_t count) {
137 gradient_t result = gradient_create();
138 result->capacity = count;
139 result->keys = sk_malloc_t(gradient_key_t, count);
140 for (int32_t i = 0; i < count; i++) {
141 gradient_add(result, keys[i].color, keys[i].position);
142 }
143 return result;
144}
145
146///////////////////////////////////////////
147

Callers 1

tex_gen_particleFunction · 0.85

Calls 2

gradient_createFunction · 0.85
gradient_addFunction · 0.85

Tested by

no test coverage detected