macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

drawImage:inRect:fromRect:

コンテキストの指定範囲destにトリミングしたCIImageを描画します
-(void)drawImage:(CIImage *)im:
            inRect:(CGRect)dest:
            fromRect:(CGRect)src:

解説

コンテキストの指定範囲destにトリミングしたCIImageを描画します。

返り値

( void )

なし

引数

( CIImage * )im
( CGRect )dest
( CGRect )src

クラス

CIContext

Instance Methods

使用可能

10.4

参照

例文

CIContext*		ciContext = [CIContext contextWithCGContext:(CGContextRef)[[NSGraphicsContext currentContext] graphicsPort] options:nil];
				//宛先矩形を計算
				CGRect aRect = CGRectMake(0,0,30, 30);
				CGRect imageRect = CGRectMake(0,0,100, 100);
				
				//コンテキストに描画
				[ciContext drawImage:inputImage inRect:aRect fromRect:imageRect];