mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-09 22:32:48 -05:00
25 lines
499 B
JavaScript
25 lines
499 B
JavaScript
|
GradientStop = Base.extend({
|
||
|
beans: true,
|
||
|
|
||
|
// TODO: support midPoint? (initial tests didn't look nice)
|
||
|
initialize: function(color, rampPoint) {
|
||
|
this.color = Color.read([color]);
|
||
|
this.rampPoint = rampPoint !== null ? rampPoint : 0;
|
||
|
},
|
||
|
|
||
|
getRampPoint: function() {
|
||
|
return this._rampPoint;
|
||
|
},
|
||
|
|
||
|
setRampPoint: function(rampPoint) {
|
||
|
this._rampPoint = rampPoint;
|
||
|
},
|
||
|
|
||
|
getColor: function() {
|
||
|
return this._color;
|
||
|
},
|
||
|
|
||
|
setColor: function() {
|
||
|
this._color = Color.read(arguments);
|
||
|
}
|
||
|
});
|