UNPKG

laya-coreui-es

Version:

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

30 lines (29 loc) 926 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawCurvesCmd = void 0; const Pool_1 = require("../../utils/Pool"); class DrawCurvesCmd { static create(x, y, points, lineColor, lineWidth) { var cmd = Pool_1.Pool.getItemByClass("DrawCurvesCmd", DrawCurvesCmd); cmd.x = x; cmd.y = y; cmd.points = points; cmd.lineColor = lineColor; cmd.lineWidth = lineWidth; return cmd; } recover() { this.points = null; this.lineColor = null; Pool_1.Pool.recover("DrawCurvesCmd", this); } run(context, gx, gy) { if (this.points) context.drawCurves(this.x + gx, this.y + gy, this.points, this.lineColor, this.lineWidth); } get cmdID() { return DrawCurvesCmd.ID; } } exports.DrawCurvesCmd = DrawCurvesCmd; DrawCurvesCmd.ID = "DrawCurves";