gpt4 book ai didi

c++ - 在 openFrameworks 上设置图像的透明度

转载 作者:行者123 更新时间:2023-11-28 05:08:07 25 4
gpt4 key购买 nike

我正在使用 openFrameworks,我想设置图像的透明度以便在按下按钮时修改它,但我不知道如何实现此参数。

我可以用什么方式改变这个值?是否有特定的功能来管理图像的透明度?

最佳答案

查看 http://openframeworks.cc/ofBook/chapters/intro_to_graphics.html

ofEnableAlphaBlending();
ofSetColor(255,0,0,127); # this would be a 50% transparent red color
ofDrawRectangle(20,20,100,100);
ofDisableAlphaBlending();

关于c++ - 在 openFrameworks 上设置图像的透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44168214/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com