UNPKG

laya-coreui-es

Version:

laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改

29 lines (28 loc) 910 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawLineCmd = void 0; const Pool_1 = require("../../utils/Pool"); class DrawLineCmd { static create(fromX, fromY, toX, toY, lineColor, lineWidth, vid) { var cmd = Pool_1.Pool.getItemByClass("DrawLineCmd", DrawLineCmd); cmd.fromX = fromX; cmd.fromY = fromY; cmd.toX = toX; cmd.toY = toY; cmd.lineColor = lineColor; cmd.lineWidth = lineWidth; cmd.vid = vid; return cmd; } recover() { Pool_1.Pool.recover("DrawLineCmd", this); } run(context, gx, gy) { context._drawLine(gx, gy, this.fromX, this.fromY, this.toX, this.toY, this.lineColor, this.lineWidth, this.vid); } get cmdID() { return DrawLineCmd.ID; } } exports.DrawLineCmd = DrawLineCmd; DrawLineCmd.ID = "DrawLine";