1st, my setLineWidth isn't working at all... it will only give me 1 pixel width... don't really know why.
2nd, i wasn't *really* expecting my IF/ELSE statement to work, but i notice that it does change up here and there between black and white strokes... essentially i'm trying to tell the computer that if the fillColor is a light color, to stroke it with black, and if it's a dark color, to stroke it with white.
any thoughts?
2nd, i wasn't *really* expecting my IF/ELSE statement to work, but i notice that it does change up here and there between black and white strokes... essentially i'm trying to tell the computer that if the fillColor is a light color, to stroke it with black, and if it's a dark color, to stroke it with white.
any thoughts?
Code:
- (void)swatchDragWithStroke:(NSRect)rect
{
[fillColor setFill];
NSRectFill(rect);
NSBezierPath *pathThickness = [NSBezierPath bezierPathWithRect:rect]
[pathThickness setLineWidth:5];
if (fillColor < [NSColor grayColor])
{
[[NSColor whiteColor] setStroke];
}
else
{
[[NSColor blackColor] setStroke];
}
[NSBezierPath strokeRect:rect];
}