Lines Matching refs:area
3142 float y_crossing, y_final, step, sign, area;
3145 // flip scanline vertically; signed area is the same
3181 // goal is to measure the area covered by '.' in each pixel
3190 // area of the rectangle covered from sy0..y_crossing
3191 area = sign * (y_crossing-sy0);
3193 // area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing)
3194 scanline[x1] += stbtt__sized_triangle_area(area, x1+1 - x_top);
3202 // in second pixel, area covered by line segment found in first pixel
3204 // is exactly what the variable 'area' stores. it also gets a contribution
3213 // which multiplied by 1-pixel-width is how much pixel area changes for each step in x
3214 // so the area advances by 'step' every time
3217 scanline[x] += area + step/2; // area of trapezoid is 1*step/2
3218 area += step;
3220 STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down
3223 // area covered in the last pixel is the rectangle from all the pixels to the left,
3225 scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f);