* @function LevelRenderer.Tool.Util.prototype.getPixelContext * @description 获取像素拾取专用的上下文。 * @return {Object} 像素拾取专用的上下文。
()
| 167 | * @return {Object} 像素拾取专用的上下文。 |
| 168 | */ |
| 169 | getPixelContext() { |
| 170 | if (!this._pixelCtx) { |
| 171 | this._canvas = document.createElement('canvas'); |
| 172 | this._width = this._canvas.width; |
| 173 | this._height = this._canvas.height; |
| 174 | this._pixelCtx = this._canvas.getContext('2d'); |
| 175 | } |
| 176 | return this._pixelCtx; |
| 177 | } |
| 178 | |
| 179 | |
| 180 | /** |
no test coverage detected