-
GlowButton - 发光的按钮控件
翻译 maninwest@Codeforge 作者:John Underhill @ Codeproject最近我在查看 KMP Player 软件上的一些图形元素(如果你想看看好的图形设计,我建议你也查看一下)。我在项目中需要的是一个简单的发光按钮控件,用于玩家控制的,这不是什么太神奇的东西,只是在鼠标悬停时能够改变颜色。让图像更改颜色很简单,只需修改 ImageAttribute 的颜色矩阵:private void DrawColoredImage(Graphics g, Image img, Rectangle bounds, Color clr)
{
using (ImageAttributes ia = new ImageAttributes())
{
ColorMatrix cm = new ColorMatrix();
// convert and refactor color palette
cm.Matrix00 = ParseColor(clr.R);
cm.Matrix11 = ParseColor(clr.G);
cm.Matrix22 = ParseColor(clr.B);
cm.Matrix33 = ParseColor(clr.A);
cm.Matrix44 = 1f;
// set matrix
ia.SetColorMatrix(cm);
// draw
g.DrawImage(img, bounds, 0, 0, img.Width,
img.Height, GraphicsUnit.Pixel, ia);
}
}示例代码中的 ParseColor 会将位转化为浮点值。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2023-07-25 02:55:04下载
- 积分:1
-
用图片作为对话框的背景 很使用的编程技术 欢迎查看
用图片作为对话框的背景 很使用的编程技术 欢迎查看-dialog with pictures as the background to the use of the very welcome View Programming
- 2023-02-03 04:45:03下载
- 积分:1
-
在窗口中显示具有动画效果的按扭。
在窗口中显示具有动画效果的按扭。-in the window display animation effects buttons.
- 2022-07-16 16:03:12下载
- 积分:1
-
此程序创建一个由Button派生出的新窗口类,来实现窗口类捕捉的功能实现!...
此程序创建一个由Button派生出的新窗口类,来实现窗口类捕捉的功能实现!-This procedure creates a Button derived from the new window class, window class to realize the function of capturing realize!
- 2023-05-31 08:35:03下载
- 积分:1
-
lt; Lt; Vc programming selected 500 cases gt; Gt; Source code Chapter 4 column w...
< vc编程精选500例>>源代码第4章 标题栏与菜单栏.rar-lt; Lt; Vc programming selected 500 cases gt; Gt; Source code Chapter 4 column with the title menu bar. Rar
- 2023-08-24 16:30:05下载
- 积分:1
-
适合光盘出租小店的,光盘出租管理软件,我也是从别的地方下载的,...
适合光盘出租小店的,光盘出租管理软件,我也是从别的地方下载的,-rental shop for the CD, CD-ROM rental management software, I also downloaded from elsewhere.
- 2022-08-22 11:17:58下载
- 积分:1
-
windows系统下实时代码,可以进行底层硬件的实时操作
windows系统下实时代码,可以进行底层硬件的实时操作-windows system real-time code that can be the underlying hardware real-time operation
- 2022-02-11 15:27:26下载
- 积分:1
-
一个动画按钮的例子,用在你的软件上,一定很绚。呵呵~
一个动画按钮的例子,用在你的软件上,一定很绚。呵呵~-Example of an animation button, used in your software, must be very Xuan. Ha ha ~
- 2022-03-22 21:02:42下载
- 积分:1
-
CxShadeButton示例,结合了渐进位图生成的按钮类
CxShadeButton示例,结合了渐进位图生成的按钮类-CxShadeButton example, the combination of a progressive generation of bitmap button category
- 2022-02-24 13:41:02下载
- 积分:1
-
数字监控控制按钮功能类,适合于监控的要求.
数字监控控制按钮功能类,适合于监控的要求.-digital monitoring control button type suitable for monitoring requirements.
- 2022-01-27 11:40:22下载
- 积分:1