UNPKG

laya-coreui-es

Version:

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

30 lines (29 loc) 866 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawPathCmd = void 0; const Pool_1 = require("../../utils/Pool"); class DrawPathCmd { static create(x, y, paths, brush, pen) { var cmd = Pool_1.Pool.getItemByClass("DrawPathCmd", DrawPathCmd); cmd.x = x; cmd.y = y; cmd.paths = paths; cmd.brush = brush; cmd.pen = pen; return cmd; } recover() { this.paths = null; this.brush = null; this.pen = null; Pool_1.Pool.recover("DrawPathCmd", this); } run(context, gx, gy) { this.paths && context._drawPath(this.x + gx, this.y + gy, this.paths, this.brush, this.pen); } get cmdID() { return DrawPathCmd.ID; } } exports.DrawPathCmd = DrawPathCmd; DrawPathCmd.ID = "DrawPath";