diff options
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-x | js/lib/geom/circle.js | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js index 8f9f54d1..05501ec3 100755 --- a/js/lib/geom/circle.js +++ b/js/lib/geom/circle.js | |||
@@ -606,8 +606,20 @@ var Circle = function GLCircle() { | |||
606 | rtnStr += "strokeWidth: " + this._strokeWidth + "\n"; | 606 | rtnStr += "strokeWidth: " + this._strokeWidth + "\n"; |
607 | rtnStr += "innerRadius: " + this._innerRadius + "\n"; | 607 | rtnStr += "innerRadius: " + this._innerRadius + "\n"; |
608 | rtnStr += "strokeStyle: " + this._strokeStyle + "\n"; | 608 | rtnStr += "strokeStyle: " + this._strokeStyle + "\n"; |
609 | rtnStr += "strokeColor: " + String(this._strokeColor) + "\n"; | 609 | |
610 | rtnStr += "fillColor: " + String(this._fillColor) + "\n"; | 610 | if(this._strokeColor.gradientMode) { |
611 | rtnStr += "strokeGradientMode: " + this._strokeColor.gradientMode + "\n"; | ||
612 | rtnStr += "strokeColor: " + this.gradientToString(this._strokeColor.color) + "\n"; | ||
613 | } else { | ||
614 | rtnStr += "strokeColor: " + String(this._strokeColor) + "\n"; | ||
615 | } | ||
616 | |||
617 | if(this._fillColor.gradientMode) { | ||
618 | rtnStr += "fillGradientMode: " + this._fillColor.gradientMode + "\n"; | ||
619 | rtnStr += "fillColor: " + this.gradientToString(this._fillColor.color) + "\n"; | ||
620 | } else { | ||
621 | rtnStr += "fillColor: " + String(this._fillColor) + "\n"; | ||
622 | } | ||
611 | 623 | ||
612 | rtnStr += "strokeMat: "; | 624 | rtnStr += "strokeMat: "; |
613 | if (this._strokeMaterial) { | 625 | if (this._strokeMaterial) { |
@@ -640,8 +652,22 @@ var Circle = function GLCircle() { | |||
640 | this._strokeStyle = this.getPropertyFromString( "strokeStyle: ", importStr ); | 652 | this._strokeStyle = this.getPropertyFromString( "strokeStyle: ", importStr ); |
641 | var strokeMaterialName = this.getPropertyFromString( "strokeMat: ", importStr ); | 653 | var strokeMaterialName = this.getPropertyFromString( "strokeMat: ", importStr ); |
642 | var fillMaterialName = this.getPropertyFromString( "fillMat: ", importStr ); | 654 | var fillMaterialName = this.getPropertyFromString( "fillMat: ", importStr ); |
643 | this._fillColor = eval( "[" + this.getPropertyFromString( "fillColor: ", importStr ) + "]" ); | 655 | if(importStr.indexOf("fillGradientMode: ") < 0) { |
644 | this._strokeColor = eval( "[" + this.getPropertyFromString( "strokeColor: ", importStr ) + "]" ); | 656 | this._fillColor = eval( "[" + this.getPropertyFromString( "fillColor: ", importStr ) + "]" ); |
657 | } else { | ||
658 | this._fillColor = {}; | ||
659 | this._fillColor.gradientMode = this.getPropertyFromString( "fillGradientMode: ", importStr ); | ||
660 | this._fillColor.color = this.stringToGradient(this.getPropertyFromString( "fillColor: ", importStr )); | ||
661 | } | ||
662 | |||
663 | if(importStr.indexOf("strokeGradientMode: ") < 0) | ||
664 | { | ||
665 | this._strokeColor = eval( "[" + this.getPropertyFromString( "strokeColor: ", importStr ) + "]" ); | ||
666 | } else { | ||
667 | this._strokeColor = {}; | ||
668 | this._strokeColor.gradientMode = this.getPropertyFromString( "strokeGradientMode: ", importStr ); | ||
669 | this._strokeColor.color = this.stringToGradient(this.getPropertyFromString( "strokeColor: ", importStr )); | ||
670 | } | ||
645 | 671 | ||
646 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | 672 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); |
647 | if (!strokeMat) { | 673 | if (!strokeMat) { |