laya-coreui-es
Version:
laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改
30 lines (29 loc) • 940 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DrawLinesCmd = void 0;
const Pool_1 = require("../../utils/Pool");
class DrawLinesCmd {
static create(x, y, points, lineColor, lineWidth, vid) {
var cmd = Pool_1.Pool.getItemByClass("DrawLinesCmd", DrawLinesCmd);
cmd.x = x;
cmd.y = y;
cmd.points = points;
cmd.lineColor = lineColor;
cmd.lineWidth = lineWidth;
cmd.vid = vid;
return cmd;
}
recover() {
this.points = null;
this.lineColor = null;
Pool_1.Pool.recover("DrawLinesCmd", this);
}
run(context, gx, gy) {
this.points && context._drawLines(this.x + gx, this.y + gy, this.points, this.lineColor, this.lineWidth, this.vid);
}
get cmdID() {
return DrawLinesCmd.ID;
}
}
exports.DrawLinesCmd = DrawLinesCmd;
DrawLinesCmd.ID = "DrawLines";