Lines Matching +full:- +full:r
2 * Copyright (c) 2023 - 2024 the ThorVG project. All rights reserved.
50 static_cast<LottieGradient*>(pair->obj)->colorStops.release(); in reset()
51 … static_cast<LottieGradient*>(pair->obj)->colorStops = *static_cast<LottieColorStop*>(pair->prop); in reset()
52 static_cast<LottieColorStop*>(pair->prop)->frames = nullptr; in reset()
56 static_cast<LottieSolid*>(pair->obj)->color.release(); in reset()
57 … static_cast<LottieSolid*>(pair->obj)->color = *static_cast<LottieColor*>(pair->prop); in reset()
58 static_cast<LottieColor*>(pair->prop)->frames = nullptr; in reset()
62 static_cast<LottieText*>(pair->obj)->doc.release(); in reset()
63 static_cast<LottieText*>(pair->obj)->doc = *static_cast<LottieTextDoc*>(pair->prop); in reset()
64 static_cast<LottieTextDoc*>(pair->prop)->frames = nullptr; in reset()
69 delete(pair->prop); in reset()
70 pair->prop = nullptr; in reset()
84 pair->prop = new LottieColorStop; in assign()
85 … *static_cast<LottieColorStop*>(pair->prop) = static_cast<LottieGradient*>(pair->obj)->colorStops; in assign()
88 pair->obj->override(&static_cast<LottieGradient*>(target)->colorStops); in assign()
93 pair->prop = new LottieColor; in assign()
94 … *static_cast<LottieColor*>(pair->prop) = static_cast<LottieSolid*>(pair->obj)->color; in assign()
97 pair->obj->override(&static_cast<LottieSolid*>(target)->color); in assign()
102 pair->prop = new LottieTextDoc; in assign()
103 … *static_cast<LottieTextDoc*>(pair->prop) = static_cast<LottieText*>(pair->obj)->doc; in assign()
106 pair->obj->override(&static_cast<LottieText*>(target)->doc); in assign()
119 auto offset = this->offset(frameNo) / divisor; in range()
120 start = nearbyintf(this->start(frameNo) / divisor) + offset; in range()
121 end = nearbyintf(this->end(frameNo) / divisor) + offset; in range()
127 auto range = end - start; in range()
129 start = static_cast<float>(random % int(len - range)); in range()
150 if (size > 0) picture->load((const char*)b64Data, size, mimeType, false); in prepare()
151 else picture->load(path); in prepare()
155 picture->size(width, height); in prepare()
156 PP(picture)->ref(); in prepare()
164 start = this->start(frameNo, exps) * 0.01f; in segment()
166 end = this->end(frameNo, exps) * 0.01f; in segment()
169 auto o = fmodf(this->offset(frameNo, exps), 360.0f) / 360.0f; //0 ~ 1 in segment()
171 auto diff = fabs(start - end); in segment()
193 uint32_t alphaCnt = (color.input->count - (count * 4)) / 2; in populate()
197 if (clast > color.input->count) clast = color.input->count; in populate()
202 for (uint32_t i = 0; i < color.input->count; ++i) { in populate()
203 if (cidx == clast || aidx == color.input->count) break; in populate()
206 cs.r = (uint8_t)nearbyint((*color.input)[cidx + 1] * 255.0f); in populate()
214 cs.r = (uint8_t)nearbyint((*color.input)[cidx + 1] * 255.0f); in populate()
219 …auto p = ((*color.input)[cidx] - output.last().offset) / ((*color.input)[aidx] - output.last().off… in populate()
228 …auto p = ((*color.input)[aidx] - output.last().offset) / ((*color.input)[cidx] - output.last().off… in populate()
229 … cs.r = lerp<uint8_t>(output.last().r, (uint8_t)nearbyint((*color.input)[cidx + 1] * 255.0f), p); in populate()
233 cs.r = (uint8_t)nearbyint((*color.input)[cidx + 1] * 255.0f); in populate()
245 cs.r = (uint8_t)nearbyint((*color.input)[cidx + 1] * 255.0f); in populate()
254 while (aidx < color.input->count) { in populate()
258 cs.r = output.last().r; in populate()
261 } else cs.r = cs.g = cs.b = 255; in populate()
269 color.input->reset(); in populate()
278 auto opacity = this->opacity(frameNo); in fill()
288 static_cast<LinearGradient*>(fill)->linear(s.x, s.y, e.x, e.y); in fill()
294 auto w = fabsf(e.x - s.x); in fill()
295 auto h = fabsf(e.y - s.y); in fill()
296 auto r = (w > h) ? (w + 0.375f * h) : (h + 0.375f * w); in fill() local
297 auto progress = this->height(frameNo, exps) * 0.01f; in fill()
300 P(static_cast<RadialGradient*>(fill))->radial(s.x, s.y, r, s.x, s.y, 0.0f); in fill()
303 auto startAngle = rad2deg(tvg::atan2(e.y - s.y, e.x - s.x)); in fill()
304 auto angle = deg2rad((startAngle + this->angle(frameNo, exps))); in fill()
305 auto fx = s.x + cos(angle) * progress * r; in fill()
306 auto fy = s.y + sin(angle) * progress * r; in fill()
308 P(static_cast<RadialGradient*>(fill))->radial(s.x, s.y, r, fx, fy, 0.0f); in fill()
319 auto cnt = fill->colorStops(&colorStops); in fill()
321 const_cast<Fill::ColorStop*>(&colorStops[i])->a = MULTIPLY(colorStops[i].a, opacity); in fill()
348 for (auto c = children.end() - 1; c >= children.begin(); --c) { in prepare()
351 if (child->type == LottieObject::Type::Trimpath) trimpath = true; in prepare()
355 … if (allowMerge && (child->type == LottieObject::Group || !child->mergeable())) allowMerge = false; in prepare()
358 switch (child->type) { in prepare()
360 visible |= static_cast<LottieGroup*>(child)->visible; in prepare()
380 if (child->type == LottieObject::Group && !child->mergeable()) { in prepare()
382 …} else if (child->type == LottieObject::SolidStroke || child->type == LottieObject::GradientStroke… in prepare()
385 … } else if (child->type == LottieObject::SolidFill || child->type == LottieObject::GradientFill) { in prepare()
394 for (uint32_t i = 0; i < children.count - 1; ) { in prepare()
396 if (!child2->mergeable() || child2->type == LottieObject::Transform) { in prepare()
401 if (!child->mergeable() || child->type == LottieObject::Transform) { in prepare()
444 clipper->appendRect(0.0f, 0.0f, w, h); in prepare()
445 PP(clipper)->ref(); in prepare()
450 solidFill->appendRect(0, 0, static_cast<float>(w), static_cast<float>(h)); in prepare()
451 solidFill->fill(color->rgb[0], color->rgb[1], color->rgb[2]); in prepare()
452 PP(solidFill)->ref(); in prepare()
463 frameNo = comp->frameAtTime(timeRemap(frameNo, exp)); in remap()
465 frameNo -= startFrame; in remap()
473 if (!initiated && root) delete(root->scene); in ~LottieComposition()
481 free((*i)->key); in ~LottieComposition()