GDI 对象 HBRUSH 半透明

发布于 2025-01-08 17:03:06 字数 942 浏览 2 评论 0原文

我正在为我的应用程序使用 GDI 和 VS 6.0。
在我的应用程序中,绘制的多边形是重叠的,并且我使用 CreateSolidBrush 用特定颜色填充每个多边形。区域是使用 CRgn 类
在此处输入图像描述
现在我的问题是我想让底层多边形变得可见(通过使重叠层半透明)。对于椭圆、线条、文本等底层其他形状也是如此。在此处输入图像描述
这里我使用了CreateHatchBrush

我知道 HBRUSH 对象可以指定颜色或可以设为透明。
但我想要的是类似于 不透明度GDI+颜色(Alpha)属性
GDI+ 似乎是一个选项,但它在 VS 6.0 中不可用。

任何有关我如何实现这一目标的意见都将受到赞赏。

I am working with GDI and VS 6.0 for my application.
In my application the drawn polygons are overlapping , and I am filling each polygon with a specific color using CreateSolidBrush.The Regions are created using the CRgn class
enter image description here
Now my problem is I want to make the underlying polygon to be some what visible ( by making the overlapping layer translucent). Same goes for underlying other shapes like ellipses,lines,text.enter image description here
Here I have used a CreateHatchBrush.

I know that the HBRUSH object can be assigned with a color or can be made transparent.
But what I want is something similar to Opacity or GDI+'s Color(Alpha) property
GDI+ seemed to be an option but its not available with VS 6.0.

Any views on how can I achieve this is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文