在不使用OpenGL的情况下在添加混合模式下绘制图像 [英] Draw an image in Additive Blend Mode without using OpenGL

查看:156
本文介绍了在不使用OpenGL的情况下在添加混合模式下绘制图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用添加剂混合模式绘制图像。但我不想使用OpenGL。
我找不到任何可以做到的事情,也许Quartz2D有什么东西?

I want to draw an image using an additive blend mode. But I don't want to use OpenGL. I can't find anything to do this, maybe there's something in Quartz2D?

有人能指出我正确的方向吗?

Can anyone point me in the right direction?

干杯,
Rich

Cheers, Rich

推荐答案

当然有枚举CGBlendMode你可以使用指定混合操作。
使用方法:

Sure there is enum CGBlendMode which you can use to specify blending operation. use method:

CGContextSetBlendMode()

[image drawInRect:CGRectMake(0, 0, width, height) blendMode:mode alpha:1];

更多信息:
link text

这篇关于在不使用OpenGL的情况下在添加混合模式下绘制图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆