背景阿尔法con运河! ! [英] Background alfa con canal ! !
问题描述
晚上好,每个人都抽出时间,我很难做出透明的背景。
如何制作透明背景
link我试图做什么
https://s3.postimg.io/h1zivhjar/fart.png [我所做的照片]
如何透明地制作背景?
什么我试过了:
/ *
//定义刷柄。
HBRUSH hBrush;
//创建一个纯蓝色画笔。
hBrush = CreateSolidBrush(RGB(255,200,255));
//将画笔与显示设备上下文关联。
SelectObject(hDC,hBrush);
//绘制一个蓝色背景的矩形
RoundRect(hDC,402,100,75,15,40,10);
* /
无法做到透明
good evening everyone makes time that I am hard to make a transparent background .
how to make the background with transparency
link'm trying to do
https://s3.postimg.io/h1zivhjar/fart.png[photo of what I do]
how to make the background with transparency ?
What I have tried:
/*
// Define a brush handle.
HBRUSH hBrush;
// Create a solid blue brush.
hBrush = CreateSolidBrush(RGB(255, 200, 255));
// Associate the brush with the display device context.
SelectObject(hDC, hBrush);
// Draw a rectangle with blue background
RoundRect(hDC, 402, 100, 75, 15, 40, 10);
*/
not can do is transparent
推荐答案
为了使颜色成分透明,你需要使用alpha混合。 Alph值从0(实线)变为255(透明),请参阅 Color。 MakeARGB方法(Windows) [ ^ ]。
In oreder to make a colour component transparent you need to use alpha blending. Alph values go from 0 (solid) to 255 (transparent), see Color.MakeARGB method (Windows)[^].
这篇关于背景阿尔法con运河! !的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!