감사 NSColorWell의 색상 컨텐츠를 그리기? 표시된 색상의 값을 참조하는 방법을 알고 있습니다.도움을 위해 다시를 NSTextView
다시. 감사.
-paul.
이 동작은 발신자로 colorWell을 사용하여 작동합니다.
이NSColor *wellColor;
wellColor = [colorWell color];
float
red, green, blue;
red = [wellColor redComponent];
green = [wellColor greenComponent];
blue = [wellColor blueComponent];
[colorWell setColor:wellColor];
[colorWell setColor:[NSColor colorWithCalibratedRed:red green:green blue:blue alpha:1.0]];
wellColor = [colorWell color];
NSRect r = NSMakeRect(190, 130, 100, 100);
NSBezierPath *bp = [NSBezierPath bezierPathWithRect:r];
NSColor *color = wellColor;
[color set];
[bp fill];
이 코드는 어떤 방법으로 존재합니까? 텍스트보기는 어디로 들어 옵니까? –