Removed the reverse colors (it was a bad idea)

This commit is contained in:
Alexandre Wilhelm
2013-05-20 21:53:35 -07:00
parent 22d66438fb
commit ce22cebf07
2 changed files with 1 additions and 5 deletions
-4
View File
@@ -70,10 +70,6 @@ CPGradientDrawsAfterEndingLocation = kCGGradientDrawsAfterEndLocation;
{
if (self = [super init])
{
// We reverse the location because we reverse the colors in CGContextDrawLinearGradient
// This is needed to get the same behavior as Cocoa when drawing a CGContextDrawLinearGradient without the object CPGradient
someLocations.reverse();
var cgColors = [],
count = [someColors count],
colorSpace = [aColorSpace CGColorSpace] || CGColorSpaceCreateDeviceRGB;
+1 -1
View File
@@ -594,7 +594,7 @@ function to_string(aColor)
function CGContextDrawLinearGradient(aContext, aGradient, aStartPoint, anEndPoint, options)
{
var colors = aGradient.colors.slice(0).reverse(),
var colors = aGradient.colors,
count = colors.length,
linearGradient = aContext.createLinearGradient(aStartPoint.x, aStartPoint.y, anEndPoint.x, anEndPoint.y);