text: import { __extends } from "tslib";
  import { Container } from "./container";
  import { Control } from "./control";
  import { _TypeStore } from '@babylonjs/core/Misc/typeStore';
  /** Class used to create 2D ellipse containers */
  var Ellipse = /** @class */ (function (_super) {
      __extends(Ellipse, _super);
      /**
       * Creates a new Ellipse
       * @param name defines the control name
       */
      function Ellipse(name) {
          var _this = _super.call(this, name) || this;
          _this.name = name;
          _this._thickness = 1;
          return _this;
      }
      Object.defineProperty(Ellipse.prototype, "thickness", {
          /** Gets or sets border thickness */
          get: function () {
              return this._thickness;
          },
          set: function (value) {
              if (this._thickness === value) {
                  return;
              }
              this._thickness = value;
              this._markAsDirty();
          },
          enumerable: false,
          configurable: true
      });
      Ellipse.prototype._getTypeName = function () {
          return "Ellipse";
      };
      Ellipse.prototype._localDraw = function (context) {
          context.save();
          if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
              context.shadowColor = this.shadowColor;
              context.shadowBlur = this.shadowBlur;
              context.shadowOffsetX = this.shadowOffsetX;
              context.shadowOffsetY = this.shadowOffsetY;
          }
          Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
          if (this._background) {
              context.fillStyle = this._background;
              context.fill();
          }
          if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
              context.shadowBlur = 0;
              context.shadowOffsetX = 0;
              context.shadowOffsetY = 0;
          }
          if (this._thickness) {
              if (this.color) {
                  context.strokeStyle = this.color;
              }
              context.lineWidth = this._thickness;
              context.stroke();
          }
          context.restore();
      };
      Ellipse.prototype._additionalProcessing = function (parentMeasure, context) {
          _super.prototype._additionalProcessing.call(this, parentMeasure, context);
          this._measureForChildren.width -= 2 * this._thickness;
          this._measureForChildren.height -= 2 * this._thickness;
          this._measureForChildren.left += this._thickness;
          this._measureForChildren.top += this._thickness;
      };
      Ellipse.prototype._clipForChildren = function (context) {
          Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, context);
          context.clip();
      };
      return Ellipse;
  }(Container));
  export { Ellipse };
  _TypeStore.RegisteredTypes["BABYLON.GUI.Ellipse"] = Ellipse;
  //# sourceMappingURL=ellipse.js.map