Home | History | Annotate | Download | only in core

Lines Matching full:distance

13     float   fDistSq;     // distance squared to nearest (so far) edge texel
14 SkPoint fDistVector; // distance vector to nearest (so far) edge texel
107 // computes the distance to an edge given an edge normal vector and a pixel's alpha value
112 float distance;
114 distance = 0.5f - alpha;
128 // we now compute the approximate distance, depending where the alpha falls
134 distance = 0.5f*(dx + dy) - SkScalarSqrt(2.0f*dx*dy*alpha);
137 distance = (0.5f - alpha)*dx;
141 distance = -0.5f*(dx + dy) + SkScalarSqrt(2.0f*dx*dy*(1.0f - alpha));
145 return distance;
174 // init squared distance to edge and distance vector
179 // init distance to "far away"
315 // enable this to output edge data rather than the distance field
321 // The distance field is constructed as unsigned char values, so that the zero value is at 128,
326 // Scale into the positive range for unsigned distance.
336 // assumes a padded 8-bit image and distance field
348 // set params for distance field data
357 // copy glyph into distance field storage
362 // create initial distance data, particularly at edges
365 // now perform Euclidean distance transform to propagate distances
373 // don't need to calculate distance for edge pixels
385 // don't need to calculate distance for edge pixels
403 // don't need to calculate distance for edge pixels
415 // don't need to calculate distance for edge pixels
427 // copy results to final distance field data
462 // assumes an 8-bit image and distance field
490 // assumes a 1-bit image and 8-bit distance field