Lines Matching defs:from
408 BGradient::ColorStop* from = ColorAt(0);
410 if (!from)
415 if (step->offset < from->offset)
416 from = step;
420 int32 index = (int32)floorf(count * from->offset + 0.5);
429 c[0] = from->color.red;
430 c[1] = from->color.green;
431 c[2] = from->color.blue;
432 c[3] = from->color.alpha;
440 if (step != from)
444 // interpolate "from" to "to"
452 float d = step->offset - from->offset;
471 uint16 fromRed = kGammaTable[from->color.red];
472 uint16 fromGreen = kGammaTable[from->color.green];
473 uint16 fromBlue = kGammaTable[from->color.blue];
486 c[3] = (uint8)floor(from->color.alpha * f + to->color.alpha * t + 0.5);
495 c[0] = (uint8)floor(from->color.red * f + to->color.red * t + 0.5);
496 c[1] = (uint8)floor(from->color.green * f + to->color.green * t + 0.5);
497 c[2] = (uint8)floor(from->color.blue * f + to->color.blue * t + 0.5);
498 c[3] = (uint8)floor(from->color.alpha * f + to->color.alpha * t + 0.5);
504 // the current "to" will be the "from" in the next interpolation
505 from = to;
511 c[0] = from->color.red;
512 c[1] = from->color.green;
513 c[2] = from->color.blue;
514 c[3] = from->color.alpha;