macOS/iOS API解説

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

目次

NSBitsPerPixelFromDepth

ピクセル当たりの色深度を返します
int  NSBitsPerPixelFromDepth ( 
      NSWindowDepth   depth );

解説

ピクセル当たりの色深度を返します。

返り値

引数

( NSWindowDepth )depth

フレームワーク

ApplicationKit

クラス

NSBitsPerPixelFromDepth

Function

使用可能

10.0

参照


defaultDepthLimit - Cocoa API解説(iOS/OS X)

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSWindowDepth *dpt = [NSWindow defaultDepthLimit];
NSLog([NSString stringWithFormat:@"depth = %d",NSBitsPerPixelFromDepth(dpt)]);

}

@end