2
A
回答
3
这是你要找的吗?
CGContextRef layerCtx = CGLayerGetContext(layer);
CGContextDrawImage(layerCtx, (CGRect){ CGPointZero, myImage.size }, myImage.CGImage);
1
您需要使用CGLayerGetContext函数从CGLayer中获取Graphic上下文。 之后,只需将新的上下文推入堆栈,然后在图形上下文中绘制图像。
相关问题
- 1. 在CoreGraphics中将CGLayer转换为* transparent * UIImage和PNG文件iphone
- 2. 来自IUView的CGLayer
- 3. 在UIImage上绘图
- 4. 上的UIImage
- 5. 石英缓存CGLayer
- 6. CGLayer,CALayer和CGContext的区别
- 7. UIImage上的模糊
- 8. UIImage -drawAtPoint:iPhone上的慢
- 9. 添加上的UIImage
- 10. ASIHTTP:上传UIImage?
- 11. 在网络上发布UIImage
- 12. 在UIImage上添加图像
- 13. 在dispatch_async中上载UIImage
- 14. 优化CGLayer drawRect方法
- 15. 如何自动释放CGLayer?
- 16. 缓存到CGLayer比iPhone上的重绘要慢
- 17. 如何在服务器上上传UIImage?
- 18. 在UIBezierPath的长度上延伸UIImage
- 19. 的UIImage不会在屏幕上显示
- 20. Alpha在UIImage的边缘上混合
- 21. EXC_BAD_ACCESS在保留的UIImage上调用drawRect
- 22. CGLayer出现错误的方式
- 23. UIImage上的iOS alpha问题
- 24. 上传的UIImage base64编码
- 25. Android上的UIImage相当于
- 26. 如何访问CGContext上对离屏创建CGLayer
- 27. 将iPhone上的UIImage上传到Facebook
- 28. 上UIImage的应用CATransform3D而上下文
- 29. UIImage的另一UIImage的
- 30. iOS - UIImage imageNamed:在设备上返回null