GraphicsContext

1. CGContext类。

2. UIView::DrawRect函数

3. UIGraphicsGetCurrentContext()函数

4. UIView坐标系和Quartz坐标系相反。

5. CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];

6. initWithFrame, intWithCoder, DrawRect

7. CGPDFContextCreateWithURL, CGPDFContextCreate

CFURLCreateWithFileSystemPath(), CGDataConsumerCreateWithURL()

8. iOS 推荐使用 UIGraphicsBeginImageContextWithOptions,它会自动做Quartz和UIKit之间的坐标变换。

9. CGBitmapContextCreate

10. Pixel Format

NULL color space:

- kCGImageAlphaoOnly 8bpp = A8

Gray color space:

- kCGImageAlphaNone 8bpp = L8

- kCGImageAlphaOnly 8bpp = A8

- kCGImageAlphaNone 16bpp = L16

- KCGImageAlphaNone|kCGBitmapfloatComponents = L32F

RGB color space:

- kCGImageAlphaNoneSkipFirst, 16bpp, 5bpc = R5G5B5X1

- kCGImageAlphaNoneSkipFirst, 32bpp, 8bpc = R8G8B8X8

- kCGImageAlphaNoneSkipLast, 32bpp, 8bpc = X8R8G8B8

- kCGImageAlphaPremultipliedFirst, 32bpp, 8bpc = R8G8B8A8

- kCGImageAlphaPremultipliedLast, 32bpp, 8bpc = A8R8G8B8

- kCGImageAlphaPremultipledLast, 64bpp, 16bpc = A16R16G16B16

- kCGImageAlphaNonSkipLast, 64bpp, 16bpc = X16R16G16B16

- kCGImageAlphaNoneSkipLast|kCGBitmapFloatComponents, 128bpp, 32bpc = X32R32G32B32F

- kCGImageAlphaPremultipliedLast | kCGBitmapFloatComponents, 128bpp, 32bpc = A32R32G32B32F

CMYK space:

- kCGImageAlphaNone 32bpp, 8bpc = C8M8Y8K8

- kCGImageAlphaNone 64bpp, 16bpx = C16M16Y16K16

- kCGImageAlphaNone|kCGBitmapFloatComponents = C32M32Y32K32F

11. CGContextSetShouldAntialias for bitmap context, CGContextSetAllowAntialasing for graphics context.

转载于:https://www.cnblogs.com/appDev/archive/2011/07/09/2101561.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值