在形状周围绘制阴影颜色?
可以用钢笔画透明的吗?
我现在通过绘画制作一个形状,问题是我想用透明颜色勾勒出该形状。目的也可以通过阴影其边界来解决。可以如何实施。 请告诉我。 谢谢
Is it possoble to draw a pencolor transparent.
I make a shape through paint now the problem is that i want to outline that shape with a transparent color .The purpose will also solve by shadowing its boundry. How it can implement .
Please tell me.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
QPen 可以从 QColor 创建,QColor 可以具有 alpha 值。 alpha 值将为您带来透明度效果。
绘制项目时,钢笔是轮廓颜色,画笔是填充颜色。因此,在您的情况下,您需要在开始绘图之前设置笔。 (注意:您可能需要给它一个宽度)。
A QPen can be created from a QColor, which can have alpha values. An alpha value is what's going to give you the transparency effect.
When drawing an item, the pen is the outline color and the brush is the fill color. So in your case you want to set the pen before you start drawing. (Note: you may have to give it a width).