|
@@ -104,11 +104,14 @@ module BABYLON.GUI {
|
|
let actualWidth = this._currentMeasure.width - this._thickness;
|
|
let actualWidth = this._currentMeasure.width - this._thickness;
|
|
let actualHeight = this._currentMeasure.height - this._thickness;
|
|
let actualHeight = this._currentMeasure.height - this._thickness;
|
|
|
|
|
|
- // Outer
|
|
|
|
|
|
+ // Outer
|
|
|
|
+ context.translate(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2);
|
|
|
|
+ context.scale(this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2);
|
|
|
|
+
|
|
context.beginPath();
|
|
context.beginPath();
|
|
- context.ellipse(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, 0, 0, 2 * Math.PI);
|
|
|
|
- context.closePath();
|
|
|
|
|
|
+ context.arc(0, 0, 1, 0, 2 * Math.PI);
|
|
|
|
+
|
|
|
|
+ context.restore();
|
|
|
|
|
|
context.fillStyle = this._background;
|
|
context.fillStyle = this._background;
|
|
context.fill();
|
|
context.fill();
|
|
@@ -124,11 +127,14 @@ module BABYLON.GUI {
|
|
let offsetWidth = actualWidth * this._checkSizeRatio;
|
|
let offsetWidth = actualWidth * this._checkSizeRatio;
|
|
let offseHeight = actualHeight * this._checkSizeRatio;
|
|
let offseHeight = actualHeight * this._checkSizeRatio;
|
|
|
|
|
|
|
|
+ context.translate(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2);
|
|
|
|
+ context.scale(offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2);
|
|
|
|
+
|
|
context.beginPath();
|
|
context.beginPath();
|
|
- context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2,
|
|
|
|
- offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
|
|
|
|
- context.closePath();
|
|
|
|
|
|
+ context.arc(0, 0, 1, 0, 2 * Math.PI);
|
|
|
|
|
|
|
|
+ context.restore();
|
|
|
|
+
|
|
context.fill();
|
|
context.fill();
|
|
}
|
|
}
|
|
|
|
|