Team Ai
Apppublic

CVPR/LIVE

sourceHugging Facegpl-3.0updated 4y agoView on Hugging Face
34likes
color.cpp26 linesDownload Raw Back to root
1#include "color.h"2 3void LinearGradient::copy_to(ptr<float> stop_offsets,4                             ptr<float> stop_colors) const {5    float *o = stop_offsets.get();6    float *c = stop_colors.get();7    for (int i = 0; i < num_stops; i++) {8        o[i] = this->stop_offsets[i];9    }10    for (int i = 0; i < 4 * num_stops; i++) {11        c[i] = this->stop_colors[i];12    }13}14 15void RadialGradient::copy_to(ptr<float> stop_offsets,16                             ptr<float> stop_colors) const {17    float *o = stop_offsets.get();18    float *c = stop_colors.get();19    for (int i = 0; i < num_stops; i++) {20        o[i] = this->stop_offsets[i];21    }22    for (int i = 0; i < 4 * num_stops; i++) {23        c[i] = this->stop_colors[i];24    }25}26