{
if (fill->radial.a < FLT_EPSILON) return;
- //TODO: Rotation???
+ //Rotation
auto rx = x + 0.5f - fill->radial.cx;
auto ry = y + 0.5f - fill->radial.cy;
auto inv2a = fill->radial.inv2a;
auto detDelta = (4 * fill->radial.a * (rxryPlus + 1.0f)) * inv2a;
auto detDelta2 = (4 * fill->radial.a * 2.0f) * inv2a;
- for (uint32_t i = 0 ; i < len ; ++i)
- {
+ for (uint32_t i = 0 ; i < len ; ++i) {
*dst = _pixel(fill, sqrt(det));
++dst;
det += detDelta;
detDelta += detDelta2;
- }
+ }
}
{
if (fill->linear.len < FLT_EPSILON) return;
- //TODO: Rotation???
+ //Rotation
auto rx = x + 0.5f;
auto ry = y + 0.5f;
auto t = (fill->linear.dx * rx + fill->linear.dy * ry + fill->linear.offset) * (GRADIENT_STOP_SIZE - 1);
y = SHRT_MAX;
}
- if (coverage) {
+ if (coverage > 0) {
auto count = rw.spansCnt;
auto span = rw.spans + count - 1;
assert(span);
if (x + acount >= rw.clip.w) xOver -= (x + acount - rw.clip.w);
if (x < 0) xOver += x;
- span->len += (acount + xOver) - 1;
+ //span->len += (acount + xOver) - 1;
+ span->len += (acount + xOver);
return;
}
if (count >= MAX_SPANS) {
_genSpan(rw.rle, rw.spans, count);
rw.spansCnt = 0;
+ rw.ySpan = 0;
span = rw.spans;
assert(span);
} else {
span->len = (acount + xOver);
span->coverage = coverage;
++rw.spansCnt;
+ rw.ySpan = y;
}
}
if (rw.cellsCnt == 0) return;
rw.spansCnt = 0;
+ rw.ySpan = 0;
for (int y = 0; y < rw.yCnt; ++y) {
auto cover = 0;
free(rle);
}
-
-
#endif /* _TVG_SW_RLE_H_ */