UNPKG

tav-media

Version:

Cross platform media editing framework

39 lines (38 loc) 1.58 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var PAGSolidLayer_1; import { PAGModule } from './pag-module'; import { PAGLayer } from './pag-layer'; import { destroyVerify, wasmAwaitRewind } from './utils/decorators'; let PAGSolidLayer = PAGSolidLayer_1 = class PAGSolidLayer extends PAGLayer { /** * Make a empty PAGSolidLayer with specified size. */ static make(duration, width, height, solidColor, opacity) { const wasmIns = PAGModule._PAGSolidLayer._Make(duration, width, height, solidColor, opacity); if (!wasmIns) throw new Error('Make PAGSolidLayer fail!'); return new PAGSolidLayer_1(wasmIns); } /** * Returns the layer's solid color. */ solidColor() { return this.wasmIns._solidColor(); } /** * Set the the layer's solid color. */ setSolidColor(color) { this.wasmIns._setSolidColor(color); } }; PAGSolidLayer = PAGSolidLayer_1 = __decorate([ destroyVerify, wasmAwaitRewind ], PAGSolidLayer); export { PAGSolidLayer };