C# 中的荧光笔
我想让我的笔可以成为荧光笔,所以基本上改变它的不透明度,但我不知道该怎么做。我目前使用颜色对话框来允许用户选择所需的颜色,但这只允许我拥有不够透明的颜色,无法像 powerpoint 上的荧光笔工具一样透明,作为工具不透明度的示例。因此,任何允许我将 colordialog 的使用与不透明度集成起来的代码都可以看穿它。
谢谢
I want to make it so my pen can be a highlighter, so basically changing its opacity, but i don't know how to do this. I currently use a colordialog to allow the use to choose desired colour but this only allows me have colours which aren't transparent enough to see through it like a highlighter tool on powerpoint as an example of the tool opacity. So any code to allow me to integrate the use of my colordialog with a opacity to be able to see through it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
类似这样:
FromArgb 的第一个参数是“alpha”或不透明度,范围从 0(完全透明)到 255(完全不透明),因此 128 是 50%。
Something like this:
The first argument to FromArgb, is the 'alpha', or opacity, on a scale from 0 (completely transparent) to 255 (completely opaque), so 128 is 50%.
http://msdn.microsoft.com/en -us/library/system.windows.media.drawinggroup.opacity.aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.drawinggroup.opacity.aspx
这是 WinForms 应用程序吗?您可以使用平板电脑笔和墨水设施吗? (该 MSDN 页面适用于 Windows XP 平板电脑版,但我认为 Vista 和 Windows 7 中包含墨水组件)
Is this a WinForms app? Could you use the Tablet PC Pen and Ink facilities? (That MSDN page is for Windows XP Tablet Edition, but I think that the ink components are included in Vista and Windows 7)