Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/zrender/lib/graphic/shape/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var Path = require("../Path");
var _subPixelOptimize = require("../helper/subPixelOptimize");
var subPixelOptimizeLine = _subPixelOptimize.subPixelOptimizeLine;
/**
* 直线
* @module zrender/graphic/shape/Line
*/
// Avoid create repeatly.
var subPixelOptimizeOutputShape = {};
var _default = Path.extend({
type: 'line',
shape: {
// Start point
x1: 0,
y1: 0,
// End point
x2: 0,
y2: 0,
percent: 1
},
style: {
stroke: '#000',
fill: null
},
buildPath: function (ctx, shape) {
var x1;
var y1;
var x2;
var y2;
if (this.subPixelOptimize) {
subPixelOptimizeLine(subPixelOptimizeOutputShape, shape, this.style);
x1 = subPixelOptimizeOutputShape.x1;
y1 = subPixelOptimizeOutputShape.y1;
x2 = subPixelOptimizeOutputShape.x2;
y2 = subPixelOptimizeOutputShape.y2;
} else {
x1 = shape.x1;
y1 = shape.y1;
x2 = shape.x2;
y2 = shape.y2;
}
var percent = shape.percent;
if (percent === 0) {
return;
}
ctx.moveTo(x1, y1);
if (percent < 1) {
x2 = x1 * (1 - percent) + x2 * percent;
y2 = y1 * (1 - percent) + y2 * percent;
}
ctx.lineTo(x2, y2);
},
/**
* Get point at percent
* @param {number} percent
* @return {Array.<number>}
*/
pointAt: function (p) {
var shape = this.shape;
return [shape.x1 * (1 - p) + shape.x2 * p, shape.y1 * (1 - p) + shape.y2 * p];
}
});
module.exports = _default; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]-- |