12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.SBrush = void 0;
- var SBrushType_1 = require("./enums/SBrushType");
- var _1 = require("./");
- var SBrush = (function () {
- function SBrush(brush) {
- this.type = SBrushType_1.SBrushType.Color;
- this._color = _1.SColor.Black;
- this._gradient = null;
- if (brush == undefined) {
- return;
- }
- if (brush instanceof _1.SGradient) {
- this.gradient = brush;
- }
- else if (brush instanceof SBrush) {
- this.type = brush.type;
- this.color = new _1.SColor(brush.color);
- }
- else {
- this.color = new _1.SColor(brush);
- }
- }
- Object.defineProperty(SBrush.prototype, "color", {
- get: function () {
- return this._color;
- },
- set: function (value) {
- this.type = SBrushType_1.SBrushType.Color;
- this._color = value;
- },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(SBrush.prototype, "gradient", {
- get: function () {
- return this._gradient;
- },
- set: function (value) {
- this._gradient = value;
- this.type = SBrushType_1.SBrushType.Gradient;
- },
- enumerable: false,
- configurable: true
- });
- return SBrush;
- }());
- exports.SBrush = SBrush;
|