UNPKG

laya-coreui-es

Version:

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

33 lines (32 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DrawPolyCmd = void 0; const Pool_1 = require("../../utils/Pool"); class DrawPolyCmd { static create(x, y, points, fillColor, lineColor, lineWidth, isConvexPolygon, vid) { var cmd = Pool_1.Pool.getItemByClass("DrawPolyCmd", DrawPolyCmd); cmd.x = x; cmd.y = y; cmd.points = points; cmd.fillColor = fillColor; cmd.lineColor = lineColor; cmd.lineWidth = lineWidth; cmd.isConvexPolygon = isConvexPolygon; cmd.vid = vid; return cmd; } recover() { this.points = null; this.fillColor = null; this.lineColor = null; Pool_1.Pool.recover("DrawPolyCmd", this); } run(context, gx, gy) { this.points && context._drawPoly(this.x + gx, this.y + gy, this.points, this.fillColor, this.lineColor, this.lineWidth, this.isConvexPolygon, this.vid); } get cmdID() { return DrawPolyCmd.ID; } } exports.DrawPolyCmd = DrawPolyCmd; DrawPolyCmd.ID = "DrawPoly";