/*
 * Paper.js
 *
 * This file is part of Paper.js, a JavaScript Vector Graphics Library,
 * based on Scriptographer.org and designed to be largely API compatible.
 * http://paperjs.org/
 * http://scriptographer.org/
 *
 * Distributed under the MIT license. See LICENSE file for details.
 *
 * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
 * http://lehni.org/ & http://jonathanpuckey.com/
 *
 * All rights reserved.
 */

var GradientStop = this.GradientStop = Base.extend({
	beans: true,

	// TODO: support midPoint? (initial tests didn't look nice)
	initialize: function(color, rampPoint) {
		this.setColor(color);
		this.setRampPoint(rampPoint);
	},

	getRampPoint: function() {
		return this._rampPoint;
	},

	setRampPoint: function(rampPoint) {
		this._rampPoint = rampPoint || 0;
	},

	getColor: function() {
		return this._color;
	},

	setColor: function(color) {
		this._color = Color.read(arguments);
	},
	
	equals: function(stop) {
		if (stop == this) {
			return true;
		} else if (stop instanceof GradientStop) {
			return this._color.equals(stop._color)
				&& rampPoint == stop._rampPoint;
		}
		return false;
	}
});

@@ -915,10 +915,9 @@
 %09%7D,%0A
-%09
 %0A
+
 %09equ
@@ -940,20 +940,23 @@
 op) %7B%0A%09%09
-if (
+return 
 stop == 
@@ -963,41 +963,12 @@
 this
-) %7B%0A%09%09%09return true;%0A%09%09%7D else if (
+ %7C%7C 
 stop
@@ -995,21 +995,15 @@
 Stop
-) %7B
 %0A%09%09%09
-return
+%09&&
  thi
@@ -1072,28 +1072,8 @@
 nt;%0A
-%09%09%7D%0A%09%09return false;%0A
 %09%7D%0A%7D

Simplify GradientStop#equals().