How to let gdi/gid+ object (pen\brush\rect\region etc.) semi-transparent?

纵然是瞬间 提交于 2019-12-11 21:48:42

问题


I want draw multi layer in DC. each layer have some gdi/gdi+ object and semi-transparent with the underlayer.


回答1:


you need to use the ARGB system for coloring. A represents transparency, it takes a value between 0 and 255. a value of 125 is semi transparant




回答2:


Using the function SetROP2 with the argument R2_MASKPEN is a very simple way to get a transparent pen effect.



来源:https://stackoverflow.com/questions/4261536/how-to-let-gdi-gid-object-pen-brush-rect-region-etc-semi-transparent

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!