Lines Matching defs:alpha
19 float fAlpha; // alpha value of source texel
114 // computes the distance to an edge given an edge normal vector and a pixel's alpha value
116 static float edge_distance(const SkPoint& direction, float alpha) {
121 distance = 0.5f - alpha;
136 // we now compute the approximate distance, depending where the alpha falls
139 // if 0 <= alpha < a1
140 if (alpha*dx < a1num) {
142 distance = 0.5f*(dx + dy) - SkScalarSqrt(2.0f*dx*dy*alpha);
143 // if a1 <= alpha <= 1 - a1
144 } else if (alpha*dx < (dx - a1num)) {
145 distance = (0.5f - alpha)*dx;
146 // if 1 - a1 < alpha <= 1
149 distance = -0.5f*(dx + dy) + SkScalarSqrt(2.0f*dx*dy*(1.0f - alpha));
441 float alpha = currData->fAlpha;
447 float result = alpha + (1.0f-alpha)*edge;