colorSpace
グラデーションオブジェクトのカラースペースを返します
解説
グラデーションオブジェクトのカラースペースを返します。
返り値
( NSColorSpace * )
カラースペースオブジェクト
引数
フレームワーク
ApplicationKit
クラス
NSGradient
使用可能
10.5
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSGradient *gradient = [[NSGradient alloc] initWithColors: [NSArray arrayWithObjects: [NSColor redColor], [NSColor greenColor], nil ] ]; [theView lockFocus]; [gradient drawFromPoint: NSMakePoint(100,100) toPoint: NSMakePoint(0,50) options: NSGradientDrawsBeforeStartingLocation ]; // NSGradientDrawsBeforeStartingLocation = (1 << 0), // NSGradientDrawsAfterEndingLocation = (1 << 1), [theView unlockFocus]; NSLog([[gradient colorSpace] description]); } @end