【问题标题】:Set transparency of an image on openFrameworks在 openFrameworks 上设置图像的透明度
【发布时间】:2017-05-24 20:50:15
【问题描述】:

我正在研究openFrameworks,我想设置图像的透明度以便在我按下按钮时对其进行修改,但我不知道如何实现此参数。

我可以通过什么方式更改此值?是否有特定功能来管理图像的透明度?

【问题讨论】:

    标签: c++ image function transparency openframeworks


    【解决方案1】:

    查看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();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-09
      • 1970-01-01
      • 1970-01-01
      • 2011-04-07
      相关资源
      最近更新 更多