jjj

function(t, e, n, o, r, i, a, c, u) {
for (var s = i, l = u.toY(0), f = [], h = [], p = [], y = [], b = o > 0 ? n.execute(o - 1) : NaN, d = o; d < r; d++) {
var g = n.execute(d);
if (g >= 0) {
var m = u.toHeight(g);
(0 === d || g >= b) && m > 1 && c > 1 ? f.push({
x: s + .5,
y: l - m + .5,
w: c - 1,
h: m - 1
}) : p.push({
x: s,
y: l - m,
w: Math.max(c, 1),
h: Math.max(m, 1)
})
} else {
var v = u.toHeight(-g);
(0 === d || g >= b) && v > 1 && c > 1 ? h.push({
x: s + .5,
y: l + .5,
w: c - 1,
h: v - 1
}) : y.push({
x: s,
y: l,
w: Math.max(c, 1),
h: Math.max(v, 1)
})
}
b = g,
s += a
}
f.length > 0 && (t.strokeStyle = e.Positive, xn.createRectangles(t, f), t.stroke()),
h.length > 0 && (t.strokeStyle = e.Negative, xn.createRectangles(t, h), t.stroke()),
p.length > 0 && (t.fillStyle = e.Positive, xn.createRectangles(t, p), t.fill()),
y.length > 0 && (t.fillStyle = e.Negative,xn.createRectangles(t, y), t.fill())
}

posted @ 2021-04-14 11:48  yellowshorts  阅读(126)  评论(0编辑  收藏  举报