Skip to content

Commit

Permalink
Handle CPGradient colorSpace argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljungberg committed Mar 11, 2012
1 parent 20cffaa commit 59ef832
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AppKit/CPColorSpace.j
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var sRGBColorSpace = nil;
}

/*!
Return an object representing the standard sRGB colorspace.
Return an object representing the standard sRGB color space.
*/
+ (CPColorSpace)sRGBColorSpace
{
Expand Down
6 changes: 3 additions & 3 deletions AppKit/CPGradient.j
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ CPGradientDrawsAfterEndingLocation = kCGGradientDrawsAfterEndLocation;
{
var cgColors = [],
count = [someColors count],
colorspace = CGColorSpaceCreateDeviceRGB;
colorSpace = [aColorSpace CGColorSpace] || CGColorSpaceCreateDeviceRGB;
for (var i = 0; i < count; i++)
cgColors.push(CGColorCreate(colorspace, [someColors[i] components]));
_gradient = CGGradientCreateWithColors(aColorSpace, cgColors, someLocations);
cgColors.push(CGColorCreate(colorSpace, [someColors[i] components]));
_gradient = CGGradientCreateWithColors(colorSpace, cgColors, someLocations);
}

return self;
Expand Down

0 comments on commit 59ef832

Please sign in to comment.