论坛帮助 |
社区圈子 |
日历事件 |
2022-04-05, 23:55 | 只看该作者 #49 | ||
|
|||
正式会员
等级: 六袋长老
|
代码:
tPathVal.setEntirePath([ // 左边十字 线 [(lmin - linespace) - (linelength / 2), (tmax - ((tmax - tmin) / 2)) + ((szxw.text/2 -lLValue.text/2) * v) + (linelength / 2)], [(lmin - linespace) - (linelength / 2), (tmax - ((tmax - tmin) / 2)) - (((szxw.text/2-lLValue.text/2) * v) + (linelength / 2))] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([ [lmax + linespace, tmax - ((tmax - tmin) / 2)], [lmax + linespace + linelength, tmax - ((tmax - tmin) / 2)] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([// 右边十字 线 [lmax + linespace + (linelength / 2), (tmax - ((tmax - tmin) / 2)) + ((szxw.text/2 -lLValue.text/2) * v) + (linelength / 2)], [lmax + linespace + (linelength / 2), (tmax - ((tmax - tmin) / 2)) - (((szxw.text/2-lLValue.text/2) * v)+ (linelength / 2))] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([ // 上边十字 线 [(lmin + ((lmax - lmin) / 2)) - (((szxw.text/2-lLValue.text/2) * v) + (linelength / 2)), tmax + linespace + (linelength / 2)], [lmin + ((lmax - lmin) / 2) + ((szxw.text/2 -lLValue.text/2) * v) + (linelength / 2), tmax + linespace + (linelength / 2)] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([ [lmin + ((lmax - lmin) / 2), tmax + linespace], [lmin + ((lmax - lmin) / 2), tmax + linespace + linelength] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([// 下边十字 线 [(lmin + ((lmax - lmin) / 2)) - (((szxw.text/2-lLValue.text/2) * v) + (linelength / 2)), (tmin - linespace) - (linelength / 2)], [lmin + ((lmax - lmin) / 2) + ((szxw.text/2 -lLValue.text/2) * v) + (linelength / 2), (tmin - linespace) - (linelength / 2)] ]); 此帖于 2022-04-06 00:14 被 dt352 编辑. |
||
2022-04-06, 00:49 | 只看该作者 #50 | |||
|
||||
正式会员
等级: 七袋长老
|
引用:
reValue代表十字横线,rfValue代表十字竖线,我也不是太懂代码,只是在原来的基础上面改了一个字,rd改为re 和 rf 下一步研究十字线可以整体向外偏移选项 tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; } } gr = g.groupItems.add(); tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([ [(lmin - linespace) - (linelength / 2) + ((rfValue.text * v) /2), tmax - ((tmax - tmin) / 2)],//左 [(lmin - linespace) - (linelength / 2) - ((rfValue.text * v) /2) , tmax - ((tmax - tmin) / 2)] ]); tPathVal.strokeColor = regColor; tPathVal.strokeWidth = lw; tPathVal.filled = false; tPathVal = gr.pathItems.add(); tPathVal.strokeDashes = []; tPathVal.setEntirePath([ [(lmin - linespace) - (linelength / 2), (tmax - ((tmax - tmin) / 2)) + (reValue.text * v) /2], [(lmin - linespace) - (linelength / 2), (tmax - ((tmax - tmin) / 2)) - (reValue.text * v) /2] ]); tPathVal.strokeColor = regColor; 此帖于 2022-04-06 01:31 被 tiantian1998 编辑. |
|||