NSGradient:drawFromCenter:radius:toCenter:radius:options:
Home 目次>ApplicationKit>NSGradient
10.5

drawFromCenter:radius:toCenter:radius:options:

円から円のグラデーションを描画します


-(void) drawFromCenter:(NSPoint)startCenter
   radius:(CGFloat)startRadius
   toCenter:(NSPoint)endCenter
   radius:(CGFloat)endRadius
   options:(NSGradientDrawingOptions)options


【返り値】
   voidなし
【パラメータ】
   startCenter開始円の中心点
   startRadius開始円の半径
   endCenter終了円の中心点
   endRadius終了円の半径
   optionsオプション


【解説】

円から円のグラデーションを描画します。



【例文】


#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{

NSGradient *gradient = [[NSGradient alloc] initWithColors:
[NSArray arrayWithObjects:
[NSColor redColor],
[NSColor greenColor],
nil
]
];
[theView lockFocus];

[gradient drawFromCenter:NSMakePoint(100,100)
radius:(CGFloat)10.5
toCenter:NSMakePoint(80,80)
radius: (CGFloat)80.3
options: NSGradientDrawsBeforeStartingLocation
];
// NSGradientDrawsBeforeStartingLocation = (1 << 0),
// NSGradientDrawsAfterEndingLocation = (1 << 1),

[theView unlockFocus];
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSGradient
修正日2006.12.26